CentOS | Sendmail
I have the following line in my sendmail.mc file:
define(`SMART_HOST',`relay:[1.1.1.1]:[2.2.2.2]')
My understanding is that sendmail will always smarthost to 1.1.1.1 and then fail-over to using 2.2.2.2 if necessary.
Can I specify a third entry here? For example:
define(`SMART_HOST',`relay:[1.1.1.1]:[2.2.2.2]:[3.3.3.3]')
What are the limits on how many entries I can specify here?
Best Answer
If you look at the $#relay mailer definition, you will see for example that it is defined as:
So your question effectively becomes: Can $h be a colon separated list, and if yes, for how many hosts? To which the bat book replies in page 739:
For the actual limit one would have to look at the sendmail sources to verify if any exists.
There is second argument implied in
A=TCP $h
which is omitted and this is the port number (assumed by default to be 25). You can have a host list and a single port, but I am not sure whether (or how) you can have a host list with a different listening port for incoming connections for each host on the list. For such an elaborate and tricky setup I would write another delivery agent that could make use of this.