1

Topic: Using specific IP for outgoing mail

==== Provide basic information to help troubleshoot ====
- iRedMail version: 0.7.1
- Linux/BSD distribution name and version: CentOS 5.6
====

Our server has 4 IP address. We would like to use one IP address for incoming mail and other IP for outgoing mail as one of the current IP got blocked by google. I've done "smtp_bind_address = 66.175.125.2xx" in the main.cf file. It also has "inet_interfaces = all". But the smtp service not working now. Here's the log file:

Aug 24 15:02:36 mail-new amavis[6554]: (06554-14) (!)DENIED ACCESS from IP 66.175.125.2xx, policy bank ''
Aug 24 15:02:36 mail-new postfix/smtp[7618]: 76B6883F647: to=<poll@eclip.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.6, delays=1.6/0/0/0, dsn=4.4.2, status=deferred (lost connection with 127.0.0.1[127.0.0.1] while receiving the initial server greeting)

I've also tried "inet_interfaces = 66.175.125.3x, 127.0.0.1". Same thing. Also tried to add the 66.175.125.2xx IP in amavisd.conf file like "inet_acl => [qw( 66.175.125.2xx 127.0.0.1 [::1] )],". Still no luck.

Any advice please?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Using specific IP for outgoing mail

Try:

- Add your IP address to "inet_acl => []".
- Set "$inet_socket_bind = undef;" to let Amavisd bind to all IP interfaces.

Restarting Amavisd is required.

3

Re: Using specific IP for outgoing mail

Thanks for the advice Zhang. But it's still not working. Returning same error message. Although I've added $inet_socket_bind = undef; and added the ip in inet_acl.

4

Re: Using specific IP for outgoing mail

Try appending IP to "inet_acl = qr();", not "inet_acl = [qr()];".

5 (edited by moyorakkhi 2011-11-14 00:45:18)

Re: Using specific IP for outgoing mail

Sorry for late reply Zhang. I've tried the syntax that you've suggested. But still no luck. This is what i've added in amavisd.conf

    inet_acl => qr( 127.0.0.1 66.175.xx.xx [::1] ),

In postfix main.cf file:

smtp_bind_address = 66.175.xx.xx

But getting the same error message:

Nov 8 18:05:12 mail-new amavis[6554]: (06554-14) (!)DENIED ACCESS from IP 66.175.125.134, policy bank ''

6 (edited by moyorakkhi 2011-11-14 00:45:48)

Re: Using specific IP for outgoing mail

I've also tried with the options like these:

inet_acl = qw( 127.0.0.1 66.175.xx.xx [::1] ),

But it's not working. Can anyone help on this please? Thanks for your response in advance.

7

Re: Using specific IP for outgoing mail

I got this resolved. Instead of using inet_acl under policy bank need to declare it separately. Here's what is did:

1. Turned off inet_acl under policy bank.
2. Add this like at the bottom of the amavisd.conf

@inet_acl = qw( 127.0.0.1 66.175.xx.xx [::1] ),

Add as my IP as you want.

8

Re: Using specific IP for outgoing mail

Thanks very much for your sharing. smile