i'm going a bit crazy over this one. so someone might help me clear out my doubts.
in my company i have set up two emailservers.
mx1.example.com (on-site) mx2.example.com (remote vps)
both with postfix and dovecot. PTR/rDNS records and static IP.
configured exactly the same.
mx1 works perfectly. but some emails go to mx2 for whatever reason.
we have to have every email on time for our business. i know that SPAM goes to mx2, most of the times. even though mx2 has the same spam-policy like mx1. some of our customers emails do as well which is unwanted.but unfortunately i haven't found out why yet.
my DNS records:
record type host value ttl priority
A mx1 xxx.xxx.xxx.xx1 automatic A mx2 xxx.xxx.xxx.xx2 automatic
CNAME mail mx1.example.com automatic
MX @ mx1.example.com 1 min 10 MX @ mx2.example.com 1 min 20
basically i want our emailclient (outlook 2010) to connect to mx2 whenever mx1 isn't reachable.because i suppose that mx2 will receive all emails when mx1 isn't reachable. i don't want mx2 to store all emails and deliver to mx1 when back online.
when i add the record: CNAME mail mx2.example.com automatic
and check my DNS from viewdns.info for example. my mailservers keep changing from mx1 to mx2 and viceversa all the time. and we virtually don't receive any emails. until i cmd -> ipconfig /flushdns and restart outlook on the clients. but then all emails get duplicated. another problem is that whenever mx1 goes down, out look sometimes seems to connect to mx2, but doesn't receive any emails due to the the selfsigned ssl certificate, which is exactly the same as on mx1 and already accepted and installed.
i also tried putting both mx to the same priority, but it's not really what i want. i don't need loadbalancing / roundrobin. since it seems, that emailclient doesn't connect to mx1 and after mx2 in order to collect all emails.
what i want is: if mx1 is down, all mail goes to mx2. and our emailclient connects to mx2 as well. is that possible somehow?
thx in advance for any help! regards, JOE
EDIT: maybe with 2 A-records pointing to xxx.xxx.xxx.xx1 and xxx.xxx.xxx.xx2 but as host mx1???