Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure my mail server to deliver mail to relay servers in round-robin fashion using Linux and sendmail 8.13.8.

I want to achieve the following:

Let's say I run as the mail server, and have relay1, relay2, relay3, and relay4 ready for actual mail delivery.

Five emails arrive to

mail 1 => mail 2 => mail 3 => mail 4 => mail 5 =>

And so forth.

I tried to set this up by defining multiple smart hosts, but it seems like the supplementary hosts only activate if the hosts before them fail.

Clearly that isn't the way. How should this be done correctly?

share|improve this question
Are you asking about email that arrives at your domain (and hence you want to load balance email reception) or are you asking about email that you send and you want to load balance it to five outgoing relays? – adamo Sep 14 '12 at 7:56
I want to balance to four outgoing relays. – Aleksi Asikainen Sep 14 '12 at 14:02

In your

define(SMART_HOST, relay1:relay2:relay3:relay4)dnl

Then according to your distribution's instructions create and restart sendmail. In Debian you just type sendmailconfig. In CentOS you type /etc/mail/make followed by a service sendmail restart.

If the relays have MX records, you may need to enclose them in square brackets

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.