Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Syncing mail between 2 mail servers?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Syncing mail between 2 mail servers?

Lets say I have 2 mail servers. mx1.domain.com and mx2.domain.com. mx1.domain.com has the highest priority.

All my mail will go to mx1.domain.com, but what happens when it goes down and all the mail will go to mx2.domain.com. Is it possible to sync it automaticly to mx1.domain.com when it comes back up? If so, is it also possible to sync the mails between mx1 and mx2 so mx2 will also be a backup for the data?

Comments

  • mx2 will just queue the mails and send then to mx1, when it comes back online. This is just how it works.

    Thanked by 2taronyu rm_
  • taronyutaronyu Member
    edited October 2013

    @rds100 said:
    mx2 will just queue the mails and send then to mx1, when it comes back online. This is just how it works.

    Always? After my reading many people said it wasn't automated.

    Anyways thank you for the fast answer.

  • Not always - you can break the config in any number of ways :)

    But yes, as long as mx2 is configured to relay mail for the domain(s) in question (rather than as a destination) it will keep it in its queue until mx1 is back up.

    For a simple postfix setup your mx2 should have the domain(s) listed under relay_domains in main.cf, where as mx1 will have them defined in my_destination

    Thanked by 1taronyu
  • @tehdan said:
    Not always - you can break the config in any number of ways :)

    But yes, as long as mx2 is configured to relay mail for the domain(s) in question (rather than as a destination) it will keep it in its queue until mx1 is back up.

    For a simple postfix setup your mx2 should have the domain(s) listed under relay_domains in main.cf, where as mx1 will have them defined in my_destination

    Thanks, will try it soon ^_^

  • edited October 2013

    As an added screening, in addition to the relay_domains directive, I also use the relay_recipient_maps directive in my main.cf.

    Spammers are known for connecting to backup MX to avoid anti-spam filters that may be running on the primary MX server. This also hides their real IP from my primary MX. So as well as setting up the backup server to queue mail until your primary mx comes back online, keep the same or better spam filters measures on the backup as the primary.

  • rm_rm_ IPv6 Advocate, Veteran

    mx2 will just queue the mails and send then to mx1, when it comes back online. This is just how it works.

    Yep and there are knobs to tweak as to for how long will it retry before replying to the original senders that "SORRY GUYS I FAIL". So if you expect your primary mx to go down and want to be able to wait over those downtimes without disruption and transparently for senders, you should change those to increase the timeouts (defaults may be something like 2-4 days). Refer to your mail server docs.

Sign In or Register to comment.