OT: Multiple Outgoing IPs?

Matt Hampton matt at coders.co.uk
Mon Apr 2 22:08:12 IST 2007


Jim Coates wrote:

>>> I have multiple public IPs available to my box, I just 
>> don't know if 
>>> its possible to configure SendMail to always associate a particular 
>>> outbound domain with one IP and another outbound domain 
>> with another 
>>> IP.

Makes perfect sense.  However a straightforward sendmail installation 
can only have one "client" ip per protocol (i.e. you can have one client 
address for IPv4 and one for IPv6 but not 2 for IPv4).

However there may be a way around this but it depends on whether you are 
willing to accept a small delay in your outbound email for one of the 
domains.

Here's how I would do it.

Modify your existing sendmail.mc file and add the following line:

CLIENT_OPTIONS(`Family=inet, Address=A.B.C.D')dnl

Create a separate config file with

CLIENT_OPTIONS(`Family=inet, Address=A.B.C.E')dnl
FEATURE(queuegroup, `mqueue2')dnl
QUEUE_GROUP(`mqueue2', `P=/var/spool/mqueue2')


Then modify "Outgoing Queue Dir" in MailScanner to a rule set to put the 
second domain into the new queue directory.

Modify the queue runner interval on the queue for a suitable value and 
volia.


(if you use NAT for your system there is also the "b" Daemon port 
modifier which will send outbound email from the same IP address that it 
was received)


matt


More information about the MailScanner mailing list