LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Routing outgoing mail on a dual external interface system with sendmail (https://www.linuxquestions.org/questions/linux-networking-3/routing-outgoing-mail-on-a-dual-external-interface-system-with-sendmail-117204/)

Dewar 11-17-2003 06:30 PM

Routing outgoing mail on a dual external interface system with sendmail
 
First off, I'm aware of the disadvantages of sendmail over qmail and the like, but I am required to use sendmail by my boss, so I can't switch over. (A shame really, sendmail is quickly becoming my nemisis)

Alright, my internet gateway/mail server is set up with one external interface and two external interfaces. Each of the external interfaces goes to a different DSL provider. Using zebra and advanced routing, the gateway load balances between the two connections and provides fail-over abilities.

My problem is that one of the connections has much more lag and connection problems than the other, and my boss really wants e-mail transfering quick out of the chute. I'd like to make sendmail only send outgoing mail through the quicker of the two interfaces (in other words, I want to force it to use eth0 over all other connections) Also, if possible, I'd like to let sendmail fail over to the second, slower connection if the first dies.

Thank you all you sendmail gurus out there
-Derek

...moved to the Linux - Netwoking forum

DaveG 11-17-2003 07:53 PM

I think the solution is going to be in the zebra domain.

sendmail just asks DNS about MX hosts and lets TCP/IP do the rest. The only sendmail configuration that comes to mind is forcing a connection back out through the incoming interface.

Dewar 11-18-2003 10:24 AM

There isn't a whole lot under zebra to configure, and none of it does what I need it to do. Is there perhaps another package I can download that will sort outgoing packets to different interfaces by destination port?

-Derek

DaveG 11-18-2003 08:54 PM

Looking at the sendmail docs, you may want to try "ClientPortOptions". That should allow you to specify which interface is used for the outgoing SMTP connection. I don't see a simple way to support fail-over with this.

If one link is faster than the other, what about using ifconfig to adjust the link metrics?

Dewar 11-19-2003 10:17 AM

I changed the link metrics as you suggested, but every e-mail was still taking more than a minute to send over the slower link. After much pain and suffering, my boss figured out that he had failed to put a DNS record on the server for the second IP. With out that DNS entry, reverese DNS lookups were failing, so pickey servers weren't acepting mail. The mail then had to be send through the other IP, and all this extra time is what caused the minute long delay.

Thanks for everyone's help.
-Derek

DaveG 11-19-2003 03:42 PM

Damn! Wish I'd thought of that. Learn something new every day.

Hope it all goes smoothly from now on,

DaveG.


All times are GMT -5. The time now is 04:42 PM.