1

Topic: smtp outbound bind to specific IP address

I've run into a wall where I can as a standard with postfix just use the 'smtp_bind_address' address directive in the master.cf file to bind all outbound connections to a particular ip address. I've found doing this with the iRedmail system produces error in the mail log files.

E.G.
amavis[25487]: (!)DENIED ACCESS from IP XXX.XXX.XXX.XXX, policy bank ''

If I leave out the bind directive emails flow in and out but postfix delivers email attaching itself to the highest ip address allocated on the server. I however need it to use the first ip address so that it matches our DNS PTR record.

E.G.
Email is currently being delivered outbound on 1.1.1.100, however I need to have it use 1.1.1.50.

Does anyone have a working solution for this?

2

Re: smtp outbound bind to specific IP address

Reference: http://groups.google.com/group/mailing. … 678a3d1ba2

3

Re: smtp outbound bind to specific IP address

Ok.. I'm still lost on this...

The post from the link above states the following.

You need to allow amavisd to accept connections from x.x.x.40/29: 
@inet_acl = qw( 127.0.0.1 [::1] x.x.x.40/29 ); 
and you need amavisd to bind to all interfaces (instead 
of a defaults which binds to a loopback interface only): 
$inet_socket_bind = undef;  # binds to all IP interfaces if undef 

Ok I've added in the extra ip subnet range in the 50-user file and restarted amavisd, and postfix. Run through some tests and am still getting exactly the same error.

My top few lines of the 50-user file.

@inet_acl = qw( 127.0.0.1 [::1] 125.xxx.75.xxx ); 
$inet_socket_bind = undef;  # binds to all IP interfaces if undef 

Does anyone with a direct example of what needs to be edited and where? or any other advise?

4

Re: smtp outbound bind to specific IP address

I don't have the same env, so suggest to post to amavisd-new mail list.
Join the mail list first: https://lists.sourceforge.net/lists/lis … mavis-user
and post to: amavis-user(AT)lists.sourceforge.net