Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 31 to 43 of 43
  1. #31
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Default

    Quote Originally Posted by harpon View Post
    Hi guys,

    I got the relaying and spam scanning working, but had to add manual domain entries into the following files:

    /usr/mailscanner/etc/rules/spam.action.rules
    /usr/mailscanner/etc/rules/spamhigh.action.rules
    /usr/mailscanner/etc/rules/spam.scanning.rules
    /usr/mailscanner/etc/rules/virus.delivery.rules
    /usr/mailscanner/etc/rules/virus.scanning.rules

    It seems that unless you actually have a hosting account created on the server, it won't add the domain into these files, even though you manually set the MX to point local.

    Chirpy, would it be possible to add the functionality to your Mailscanner FE to manually add a domain for spam and virus scanning so it adds them into the above files?

    As it stands, i got it working without having a hosting account created. I just have the DNS record and the entries in the files above.
    If you add the domain to /etc/localdomains chirpys cpanel mailscanner wrapper will add the config lines automatically into the mailscanner rules files

  2. #32
    Member
    Join Date
    May 2007
    Posts
    114

    Default

    Sorry if this sounds dumb, but I am still unsure about the right way to add domains.

    Let's say I am running MailScanner on my VPS. There is an external domain called www.example.com whose emails I want MailScanner to scan and then relay to the mailboxes physically hosted on the external server.

    Exactly how should step 2 of the exim smart router configuration on /etc/staticroutes on my VPS look like? Should it be:

    example.com: what should come here?
    Should I put the IP address of my VPS or my mailserver hostname or the IP address of the external domain?

  3. #33
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Default

    after the domain is the IP or FQDN of the destination server (where mailbox delivery occurs)

  4. #34
    Member beddo's Avatar
    Join Date
    Jan 2007
    Location
    England
    Posts
    145
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    I'm trying to set up the basic remote_smtp_smart but seem to be hitting a little snag. Firstly, I've had to remove the domain from /etc/localdomains otherwise it checks the local user list.

    I'm seeing messages staying in the queue on the server with this:

    LOG: MAIN
    lowest numbered MX record points to local host: influ.co.uk
    LOG: MAIN
    == beddo@influ.co.uk R=lookuphost defer (-1): lowest numbered MX record points to local host
    LOG: MAIN
    Frozen

    The "static_route:" stuff is before lookuphost in the routers configuration so it looks to me like it is just being completely ignored


    This is in routers
    Code:
    static_route:
    driver = manualroute
    condition = "${perl{checkspam}}"
    route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
    transport = remote_smtp_smart
    This is in transports:
    Code:
    remote_smtp_smart:
      driver = smtp
      port = 25
      hosts = ${lookup{$domain}lsearch{/etc/staticroutes}}
      hosts_override
    Anyone got any ideas what I'm missing?

  5. #35
    Member
    Join Date
    May 2007
    Posts
    114

    Default

    Quote Originally Posted by nickp666 View Post
    after the domain is the IP or FQDN of the destination server (where mailbox delivery occurs)
    Thanks. I put the IP of the server where the mailboxes are physically hosted and finally got the VPS to scan the messages sent from the email account on the external domain. this works fine.

    However, there is a problem with emails sent to the accounts on the external domain. The mails bounce back from the server doing the mail processing with the following message:

    Mail Delivery System <Mailer-Daemon@host.mailprocessingdomain.com>

    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:

    testaccount@externaldomain.com

    SMTP error from remote mail server after RCPT TO:<testaccount@externaldomain.com>:
    host IP ADDRESS: 550-host.mailprocessingdomain.com is currently not permitted to relay 550-through this server. Perhaps you have not logged into the pop/imap server
    550-in the last 30 minutes or do not have SMTP Authentication turned on in your
    550 email client.
    This seems to suggest that if I were to try the same thing for real life clients, the system would fail as their mailservers would also be probably configured to disallow relaying. Is there any way to resolve this?

    To sum up:

    1.) The MX record of the external domain points to my VPS's mailserver
    2.) I have created an /etc/staticroutes file on my VPs with the following entry:
    externaldomainname: IP address of server on which the domain is hosted
    3.) I have configured exim smart routing on my VPS and added the external domain to /etc/localdomains

    Any help would be appreciated.

  6. #36
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Default

    Quote Originally Posted by meeven View Post
    Thanks. I put the IP of the server where the mailboxes are physically hosted and finally got the VPS to scan the messages sent from the email account on the external domain. this works fine.

    However, there is a problem with emails sent to the accounts on the external domain. The mails bounce back from the server doing the mail processing with the following message:



    This seems to suggest that if I were to try the same thing for real life clients, the system would fail as their mailservers would also be probably configured to disallow relaying. Is there any way to resolve this?

    To sum up:

    1.) The MX record of the external domain points to my VPS's mailserver
    2.) I have created an /etc/staticroutes file on my VPs with the following entry:
    externaldomainname: IP address of server on which the domain is hosted
    3.) I have configured exim smart routing on my VPS and added the external domain to /etc/localdomains

    Any help would be appreciated.
    are the domains you are sending to, in /etc/localdomains?

    from that error looks like their not.

  7. #37
    Member
    Join Date
    May 2007
    Posts
    114

    Default

    Quote Originally Posted by nickp666 View Post
    are the domains you are sending to, in /etc/localdomains? from that error looks like their not.
    Thanks. Well, the domain is in the /etc/localdomains file of the VPS running MailScanner that's actually meant to scan the emails and then relay them to the server on which that external domain is physically hosted.

    However, I removed it from /etc/localdomains of the VPS physically hosting the domain because I had MailScanner installed on it as well and it was scanning the emails on this domain, completely defeating the purpose of having it scanned externally. Instead, I put in in the /etc/remotedomains file to tell Exim to ignore processing it.

    From what I have seen, the issue is that the receiving server (where the domain and mailboxes are physically hosted) does not allow the processing server to relay to it after scanning. In sum, it seems to mean that I will have the same problem with clients who approach me only for scanning their emails.

    Yet, this seems strange because I myself use MXLogic's Email Defense spam filtering service on one of my domains and all I had to do was to point that domain's MX records to those servers. I am sure this is possible, I am just missing something crucial.

  8. #38
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Default

    the domain needs to be in /etc/localdomains on both servers, on the destination box just set the domains scanning off in the mailscanner rules, the error its throwing is cannot relay to non-local domain (because on the destination server the domain is in /etc/remotedomains it will only relay to it for authenticated users - you have simply created a routing loop - hence why it doesnt work)

  9. #39
    Member
    Join Date
    May 2007
    Posts
    114

    Default

    Thank you. I will test this out. I think this is going to work.

  10. #40
    Member
    Join Date
    May 2007
    Posts
    114

    Default

    You're a gem It works, finally, although I should remember to remove the domain from MailScanner's virus and spam scanning rules- the domain gets added to this list automatically when the MailScanner cronjob runs.

  11. #41
    Member
    Join Date
    Jan 2005
    Location
    /dev/null
    Posts
    770

    Default

    Quote Originally Posted by meeven View Post
    You're a gem It works, finally, although I should remember to remove the domain from MailScanner's virus and spam scanning rules- the domain gets added to this list automatically when the MailScanner cronjob runs.
    Leave the domain config in there, just turn the scanning off, otherwise it will keep being put back every day!

  12. #42
    Member beddo's Avatar
    Join Date
    Jan 2007
    Location
    England
    Posts
    145
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Seen as noone appears to have been able to get much from my little problem, I've had a bit more of a look. It seems like the messages are getting passed through the directors first where it hits localuser: before going to the routers.

    This seems to me like basically the router needs rewriting to be a director that can be put in earlier in the food chain - at least for my server though I'm not sure on the syntax for that so could anyone help out?

  13. #43
    Member beddo's Avatar
    Join Date
    Jan 2007
    Location
    England
    Posts
    145
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    If anyone else comes across the same problem, it turned out to be permissions. I'd given permissions but it wasn't in the right group.
    /etc/staticroutes needs to be root:mail 660 otherwise it just fails silently with no errors logged. There are also quite a few sections under routers where you can put the router code, I'd put it right at the top but it needed to be further down in the first bit of routers generated from old directors.

    Works fine now.

Similar Threads & Tags
Similar threads
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube