How-to configure Sendmail as a secondary Mx (store and forward) ?

I have 3 mail servers (One Microsoft Exchange and two Mailmax). The mailmax servers have 100+ domains on each. I also have a Spam filtering server (Vircom) that is used for 80% of the domains we host.
I want to configure Sendmail as a backup mail server that will receive and store mail whenever one of our server is down and will resend mail to the mail server when it come back up. I don't wan't to list each mailbox on Sendmail (this woul'd be a nightmare to manage), only the domains.

DNS entries look like this :      IN     A      (This would be the new Sendmail server)   IN     A                  IN     MX      10                  IN     MX      20    IN     A                 IN     MX      10                 IN     MX      20       IN     A                 IN     MX      10                 IN     MX      20

The Sendmail version installed is 8.14.3.

I found on this site many way to do it but I am not sure wich one is the best for our needs.

Thanks !

Who is Participating?
Wonko_the_SaneConnect With a Mentor Commented:
In your case you should be able to use access or relay-domains, it should work either way. relay-domains is probably the most straightforward approach. "access" gives you way more possibilties (custom error messages, relaying based on single addresses etc), but you shouldn't need this. If using access you will usually have to create your hashmap after modifying the file, thus involving more steps.

I recommend to read the exhaustive on sendmail about those files, this will give you the most accurate answers.
If you run sendmail with a standard configuration, and your MX records for all your domains are suitable for this type of setup (e.g. you do not require your sendmail server to use different IPs then external senders), it should be as easy as putting your domains in the  "relay-domains" file (e.g. in /etc/mail/).

Of course you need to make sure that sendmail is running as a daemon, that it has queue runners, that your firewall etc. allows the necessary traffic (DNS and TCP 25 at the very least). As I said, in a standard config for sendmail this should all be no big deal, however sendmail has a lot of options and it is important to configure it correctly, but I think this is way beyond the scope of a forum like this. Also remember that doing this can have an impact on your anti-spam software, since e-mails will now be forwarded from your server instead of from an external one, and this might affect the spam filtering capabilities. Also you need to make sure that you also have a decent anti-spam and -virus solution place for your sendmail server, as many spammer would try to use the server with the highest MX preference hoping for less effective anti-spam technology.

To summarize this: If you do not really know what I am talking about here, maybe you should rethink your idea and instead use a software that you are familiar with. Not trying to offend.
Phil_TrahanAuthor Commented:
Thanks for the answer.
I'm new to sendmail but I have a good experience in this kind of stuff.
We are trying to understand the difference between "relay-domains" file, "relay-allow" file and the "access" database and how they work, or not, together. Can you explain ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.