Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Oct 2006
    Location
    Cheshire, UK
    Posts
    196

    Exclamation SMTP Backup - Undone recent changes, but not fixed!

    My current setup before any changes were made is explained here: MX/SMTP Forwarding with Backup

    Basically what I now want to do is to have 'mailbackup.domain' as the first MX record, and my Exchange Server as the second. The reason being is I want all email checked by SpamAssassin before being forwarded to the next MX record; thus removing any spam before delivering to my Exchange Server (which has no spam protection).

    Zen Internet have done the very same thing previously with my domains, where their mail cluster (4 servers running Exim 4.x) are the 1st MX record (mailcluster.zen.co.uk) and my domain is the 2nd.

    There are several domains on my server that want this functionality, so for the time being I have only changed my DNS records, as follows:

    domain. MX 10 mailbackup.domain.
    domain. MX 20 mail.domain.

    * mailbackup represents my server IP, and mail respresents my Exchange Server IP.

    I've applied the change direct to the .DB file located under /var/named/ and restarted the BIND service in WHM. I send a few test emails (using the SMTP service on the server, sending from one domain into the domain I've just made the changes to).

    I receive all emails no problem, with no errors.

    However today I have not received the emails I get on a daily basis from the server telling giving me a server status update and so on. I check the Mail Queue to find they're queued, and have been for over 12 hours! I try to release the emails to be told:

    LOG: MAIN
    cwd=/usr/local/cpanel/whostmgr/docroot 3 args: exim -v -qff
    LOG: queue_run MAIN
    Start queue run: pid=8806 -qff
    delivering 1GqhQa-0002bE-W7 (queue run pid 8806)
    LOG: MAIN
    Unfrozen by forced delivery
    LOG: MAIN
    lowest numbered MX record points to local host: domain
    LOG: MAIN
    == admin@domain R=lookuphost defer (-1): lowest numbered MX record points to local host
    LOG: MAIN
    Frozen

    ...And so on...

    I've also noticed that emails from an external location have the same problem!

    I have now reverted back to the original DNS and restarted BIND and EXIM. However the same problem is occuring! Any new emails that come in just queue and I cannot release them!!! HELP!!!

    As a note, I have checked /etc/localdomains, /etc/remotedomains and /etc/secondarymx but these remain unchanged (they're config'd OK).

    Any help on resolving this urgent issue would be greatly appreciated.

    Thanks in advance.

  2. #2
    Member
    Join Date
    May 2006
    Posts
    59

    Default DNS MX config

    Ok, so MX records just have priority assigned to them. By having multple entries with different priorities, does not accomplish your mail relay you would like setup.

    If host A has SPAM filtering, and B is you exchange server.

    Host A would exist in MX record only. Host A would have rules configured to take all mail belonging to Host B and forward them or relay them.

    I hope I understood your problem properly.

    Also, refer to http://en.wikipedia.org/wiki/MX_record for more info on MX record priorities

  3. #3
    Member rikgarner's Avatar
    Join Date
    Mar 2006
    Location
    /dev/null
    Posts
    75

    Default

    Hi Dave,
    Im sorry, but I don't think that the standard Exim configuration with Cpanel is capable of doing what you want.

    If I understand it correctly, you are talking about using Exim as an SMTP gateway like me$$agelabs, whereby your Cpanel server accepts all your incoming email, filters it, and sends it on.

    However, the exim configuration within Cpanel does not support this - it is set up for mail performance, so it routes mail via the quickest route it can. As it is processing through the routers for your mail, it will see "lookup" as the transport, will perform an MX lookup on your domain, and find that itself is the primary MX. As this would cause a mail loop, you get your error.

    The other problem is that a number of spam-senders send to the secondary MX to start with to try and avoid mail filtering.

    What you would need to do is run a second instance of Exim with a seperate routing-config which uses a manual-routes table to lookup routing hosts:

    1. Exim Daemon accepts the mail on port 25
    2. Spamassassin processes
    3. Spamassassin failed mail gets junked
    4. Spamassassin passed mail gets queued in second Exim queue
    5. Second Exim instance processes its queue, and uses the specific routes to deliver mail.

    You could use MailScanner to achieve this (as it sets up two seperate Exim queues), or set it up from scratch yourself (the official Exim guide is a good start for this), but note that Cpanel will probably not support any email problems you have in this configuration.

    I would have to add that it is probably too complicated to do this through forum-feedback, as you could run up against something which disables your mail while you wait for a reply - my advice would be to get an experienced admin (someone who has done it before) to do this.

    To get you back up and running, either set Exim as the primary MX and use Dataenter.co.at 's PopBeamer to download and pass mail to Exchange, or set the MX's to be your Exchange server, however either way you are going to have to put up with the spam.

    Rich
    Any views or opinions presented are solely those of the author and do not necessarily represent those of Computer Service Centre. Any advice is given soley on the assumption that it will be followed at your own risk.

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 03-29-2007, 08:27 AM
  2. MX/SMTP Forwarding with Backup
    By DReade83 in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 10-22-2006, 03:25 PM
  3. Even worse... SMTP now reject Auth since we fixed the Cwd problem
    By mpierre in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-18-2005, 05:41 PM
  4. pure-tfpd + proftd/passwd.vhosts: changes getting undone after a while
    By The MAzTER in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-15-2005, 02:09 PM
  5. Jailed shell being undone!!!!!!!!!
    By sexy_guy in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 07-17-2003, 05:07 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube