Operating System - HP-UX
1826772 Members
2359 Online
109702 Solutions
New Discussion

Re: Can I have two relay hosts for email

 
SOLVED
Go to solution
Nick D'Angelo
Super Advisor

Can I have two relay hosts for email

I am configuring a new Unix server and the question came up.

We currently forward mail to one NT relay host but can I configure two in the sendmail file?
Always learning
8 REPLIES 8
Kevin Wright
Honored Contributor

Re: Can I have two relay hosts for email

I think there can be only one DS..or smart relay host defined.
someone_4
Honored Contributor

Re: Can I have two relay hosts for email

Hello,

It took me a while but I thought there was a way to do this and here it is.

To configure SendMail to use more then one relay, edit:

/etc/mail/sendmail.cf

file and simply specify the hosts separated by a colon with no
spaces. For example:

DShostA:hostB:hostC

SendMail will always try hostA first. If hostA does not respond,
or responds incorrectly, then SendMail will try hostB and then hostC.But it will not load balance

Richard
Kevin Wright
Honored Contributor

Re: Can I have two relay hosts for email

excellent, thanks Richard!

Re: Can I have two relay hosts for email

Maybe this goes outside of what you were asking, but you can also modify your sendmail.cf to re-direct mail 'between' two relays instead of use one, failover to the next, etc.

I do this to balance internal mail using our standard mail system (i.e. Lotus Notes) and mail that needs to go out on the Internet (i.e. to pagers)

First, you'll need to uncomment the line that enables the mailertable function:

Kmailertable dbm -o /etc/mail/mailertable

This points to the mailertable file that you will have to construct whose contents look similar to this:

pagenet.net smtp:smtp.rev.net
imcingular.com smtp:smtp.rev.net
bellsouthips.com smtp:blsmsgims.bls.com

This way, I regulate what gets sent out of my box. There is an ITRC document that provides the procedure on creating and using the mailertable feature...

Mike-


If I can't be part of the Greatest, I just have to be the Greatest myself!
someone_4
Honored Contributor

Re: Can I have two relay hosts for email

Nick
Did my suggestion work for you?

richard
Nick D'Angelo
Super Advisor

Re: Can I have two relay hosts for email

Richard, it appears to have worked, although I guess I won't know until one mail server goes down.

Is there any other way to test this?

Sorry for the delay in replying as I was on holidays.
Always learning
someone_4
Honored Contributor
Solution

Re: Can I have two relay hosts for email

Hey Nick
No problem ...
well if you really wanted to test it there are ways to bring the box "down". Maybe unplug the nick card of the first one and let it go to the 2nd one. Of if you are using only /etc/hosts comment out the entry of the first one so it cant relay to that host.

Richard
Nick D'Angelo
Super Advisor

Re: Can I have two relay hosts for email

Richard,

Thanks for the helpful tip. It worked like a charm.

Nick
Always learning