Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

source ip for outgoing connections

0 views
Skip to first unread message

Vector

unread,
Jun 30, 2002, 11:26:34 PM6/30/02
to
Hello all,
Is there a way to tell postfix which IP address to use when initiating
outgoing smtp connections and sending email? My network interface has
several IP's and I can't chage the primary IP because of other applications
that are not capable of configuring which ip to bind to. eth0 is the
primary interface with primary IP. This is the one that the kernal uses
when binding a socket using the address constant IPADDR_ANY. The address
that I have postfix listening on is defined on eth0:5. It listens, accepts
incoming connections, but sends mail to other mail severs from the address
configured on eth0.

I saw the neohapsis archive message thread with someone asking about
this question and Wietse telling him to rearrange his IPs on his interfaces
as the solutions. That is not acceptable here so I was wondering if there
is a way to tell smtpd which address to bind it's sockets to when sending
mail to other servers. Thanks,

vec


-
To unsubscribe, send mail to majo...@postfix.org with content
(not subject): unsubscribe postfix-users

Dean Strik

unread,
Jul 1, 2002, 1:20:15 AM7/1/02
to
Vector wrote:
> Hello all,
> Is there a way to tell postfix which IP address to use when initiating
> outgoing smtp connections and sending email? My network interface has
> several IP's and I can't chage the primary IP because of other applications

In your master.cf, change the smtp-inet line from e.g.

smtp inet n - n - 250 smtpd

to

smtp inet n - n - 250 smtpd -o bind_address=my.ip.ad.dy

--
Dean C. Strik Eindhoven University of Technology
de...@stack.nl | de...@ipnet6.org | http://www.ipnet6.org/
"This isn't right. This isn't even wrong." -- Wolfgang Pauli

Bill Landry

unread,
Jul 1, 2002, 1:52:59 AM7/1/02
to
Or in main.cf use:

inet_interfaces = xxx.xxx.xxx.xxx <--- Listening IP Address
smtp_bind_address = xxx.xxx.xxx.xxx <--- Sending IP Address

Bill

to

---
[This e-mail was scanned for viruses by Pointshare's Virus Scanning Service]

Vector

unread,
Jul 1, 2002, 5:04:14 AM7/1/02
to
Thanks a bunch guys...that's what I was looking for! Postfix rocks!

vec

Victor....@morganstanley.com

unread,
Jul 1, 2002, 10:11:12 AM7/1/02
to
On Mon, 1 Jul 2002, Dean Strik wrote:

> Vector wrote:
> > Hello all,
> > Is there a way to tell postfix which IP address to use when initiating
> > outgoing smtp connections and sending email? My network interface has
> > several IP's and I can't chage the primary IP because of other applications
>
> In your master.cf, change the smtp-inet line from e.g.
>
> smtp inet n - n - 250 smtpd
>
> to
>
> smtp inet n - n - 250 smtpd -o bind_address=my.ip.ad.dy
>

This is wrong:

- Outgoing connections have nothing to do with "smtpd".

- There is no parameter called "bind_address" that is understood by
"smtpd" or any other Postfix daemon.

- The place to set these parameters is usually main.cf not master.cf
unless the parameter setting varies by transport.

The right answer has already been provided in another response.

--
Viktor.

Dean Strik

unread,
Jul 1, 2002, 10:28:43 AM7/1/02
to
Victor....@morganstanley.com wrote:
> > smtp inet n - n - 250 smtpd -o bind_address=my.ip.ad.dy
> >
>
> This is wrong:
>
> - Outgoing connections have nothing to do with "smtpd".
>
> - There is no parameter called "bind_address" that is understood by
> "smtpd" or any other Postfix daemon.

You're absolutely right; I was mistaken here.

> - The place to set these parameters is usually main.cf not master.cf
> unless the parameter setting varies by transport.

True.

--
Dean C. Strik Eindhoven University of Technology
de...@stack.nl | de...@ipnet6.org | http://www.ipnet6.org/
"This isn't right. This isn't even wrong." -- Wolfgang Pauli

0 new messages