OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: [2] how to bind smtp client to specific address?
From: Chip Christian (chipprincetonecom.com)
Date: Fri Mar 31 2000 - 10:51:34 CST


A better solution may be to allow smtp to take an address as part of
argv[]. Then you might have several entries in master.cf, referenced by
different names in transport, since you might want a different outgoing
address by destination. But then again, this presupposes the other
methods already covered (inet_interfaces, ip routing games) don't solve
your problem already.

> Wietse!
> Can you consider to include, say, "smtpd_outgoing_address" parameter
> into postfix? Sounds like people still asking about this...
> This is a trivial addition, but with non-trivial background
> (if machine really have multiple interfaces and connections
> are made on some of this, not just only one, this should be
> turned into map, not single "outgoing_address", and this is
> not perfect...).
> Or maybe add this to FAQ -- i.e. "people, set up your tcp/ip
> stack properly for this!" -- this particular question, I guess,
> can be "cured" trivially (or not-so-trivially if there is
> unusual setup here) by setting up correctly tcp routing tables
> etc. Especially if this is linux, where one can tell kernel
> what source address should be used by what routing table entry
> (don't know if such ability exists on other systems).
>
> Denis Shaposhnikov wrote:
> >
> > My situation. I have interface with ip address and one
> > alias. Postfix's smtpd must receive mail for all ip addresses. But
> > postfix's smtp client must use only alias's ip address (not
> > INADDR_ANY) as source address. How can I do this?
>
> Currently postfix can't use specific address for outbound connections,
> it always uses INADDR_ANY (as you seen), and lefts this choice to
> system's tcp/ip stack. And, as I can see, most problems around statically
> assingnig source address exists on inproperly configured (or buggy) tcp/ip.
> One example of this was my own setup (that is cured now) -- old solaris
> (maybe 2.4, don't remember for now) sometimes incorrectly chooses src
> address for default route. I have one NIC, that have two addresses --
> 192.168.xx.xx for internal net and 212.158.168.xx for internet access,
> with default routing to 212.158.168.yy. And sometimes it tried to use
> it's 192.168.xx.xx for outbound connection to outside world, and vice
> versa (212.158.168.xx for internal network), especially after
> "hot-changing" addresses. And now, in 2.6, this works just fine.
>
>