
25th March 2011, 01:54
|
|
Member
|
|
Join Date: Jul 2009
Posts: 89
Thanks: 7
Thanked 1 Time in 1 Post
|
|
Postfix Multiple IP's
Hi all..
I've a mail marketing system running in ISPConfig..
Thats ok, ISPConfig is very fast..
But I need to make my postfix to change IP/hostname while send the list of e-mails.
It's possible? Is necessary to run another instance of postfix? How can I do to use more SMTP's (ips/hostnames) in the same ispconfig server?
|

25th March 2011, 10:23
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,182 Times in 3,201 Posts
|
|
The IP that postfix uses is set with the parameter smtp_bind_address in the postfix main.cf file. You can e.g. change the IP there and then restart postfix.
|

25th March 2011, 16:45
|
|
Member
|
|
Join Date: Jul 2009
Posts: 89
Thanks: 7
Thanked 1 Time in 1 Post
|
|
Ok Till, but I could put it in cron to restart postfix and change this parameter? I'll have a problems with items scheduled?
|

25th March 2011, 19:03
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,182 Times in 3,201 Posts
|
|
Yes, you can put that into cron.
Quote:
|
I'll have a problems with items scheduled?
|
I dont think so, asl all mails get kept in the queue.
|
|
The Following User Says Thank You to till For This Useful Post:
|
|

25th March 2011, 21:18
|
|
Member
|
|
Join Date: Jul 2009
Posts: 89
Thanks: 7
Thanked 1 Time in 1 Post
|
|
Ok Till..
What the difference between inet_interfaces and smtp_bind_address ?
If I input all ip's in inet_interfaces parameter, fix my solicitation?
I read about master.cf parameters:
Code:
192.168.0.1:smtp inet n - - - - smtpd
If I input in master.cf all ip's fix the my solicitation?
|

26th March 2011, 15:56
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,591 Times in 2,443 Posts
|
|
inet_interfaces:
Quote:
The network interface addresses that this mail system receives mail on. Specify "all" to receive mail on all network interfaces (default), and "loopback-only" to receive mail on loopback network interfaces only (Postfix version 2.2 and later). The parameter also controls delivery of mail to user@[ip.address].
Note 1: you need to stop and start Postfix when this parameter changes.
Note 2: address information may be enclosed inside [], but this form is not required here.
When inet_interfaces specifies just one IPv4 and/or IPv6 address that is not a loopback address, the Postfix SMTP client will use this address as the IP source address for outbound mail. Support for IPv6 is available in Postfix version 2.2 and later.
On a multi-homed firewall with separate Postfix instances listening on the "inside" and "outside" interfaces, this can prevent each instance from being able to reach servers on the "other side" of the firewall. Setting smtp_bind_address to 0.0.0.0 avoids the potential problem for IPv4, and setting smtp_bind_address6 to :: solves the problem for IPv6.
A better solution for multi-homed firewalls is to leave inet_interfaces at the default value and instead use explicit IP addresses in the master.cf SMTP server definitions. This preserves the Postfix SMTP client's loop detection, by ensuring that each side of the firewall knows that the other IP address is still the same host. Setting $inet_interfaces to a single IPv4 and/or IPV6 address is primarily useful with virtual hosting of domains on secondary IP addresses, when each IP address serves a different domain (and has a different $myhostname setting).
See also the proxy_interfaces parameter, for network addresses that are forwarded to Postfix by way of a proxy or address translator.
Examples:
inet_interfaces = all (DEFAULT)
inet_interfaces = loopback-only (Postfix version 2.2 and later)
inet_interfaces = 127.0.0.1
inet_interfaces = 127.0.0.1, [::1] (Postfix version 2.2 and later)
inet_interfaces = 192.168.1.2, 127.0.0.1
|
smtp_bind_address:
Quote:
An optional numerical network address that the Postfix SMTP client should bind to when making an IPv4 connection.
This can be specified in the main.cf file for all SMTP clients, or it can be specified in the master.cf file for a specific client, for example:
/etc/postfix/master.cf:
smtp ... smtp -o smtp_bind_address=11.22.33.44
Note 1: when inet_interfaces specifies no more than one IPv4 address, and that address is a non-loopback address, it is automatically used as the smtp_bind_address. This supports virtual IP hosting, but can be a problem on multi-homed firewalls. See the inet_interfaces documentation for more detail.
Note 2: address information may be enclosed inside [], but this form is not required here.
|
|
|
The Following User Says Thank You to falko For This Useful Post:
|
|

29th March 2011, 00:19
|
|
Member
|
|
Join Date: Jul 2009
Posts: 89
Thanks: 7
Thanked 1 Time in 1 Post
|
|
Falko and Till..
I create a script to change the value of "smtp_bind_address" every minute. But, when I set this parameter on main.cf, I get this message:
Code:
Mar 28 19:14:04 turbo amavis[16754]: (16754-08) (!)DENIED ACCESS from IP 187.x.x.15, policy bank ''
Mar 28 19:14:04 turbo postfix/smtp[17458]: 4EFAB50C16F4: to=<xxxxxxx@hotmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.1, delays=0.09/0.01/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)
What is this??
Thanks
|

31st March 2011, 09:49
|
|
Junior Member
|
|
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by guimnk
Falko and Till..
I create a script to change the value of "smtp_bind_address" every minute. But, when I set this parameter on main.cf, I get this message:
Code:
Mar 28 19:14:04 turbo amavis[16754]: (16754-08) (!)DENIED ACCESS from IP 187.x.x.15, policy bank ''
Mar 28 19:14:04 turbo postfix/smtp[17458]: 4EFAB50C16F4: to=<xxxxxxx@hotmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.1, delays=0.09/0.01/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)
What is this??
Thanks
|
In Amavis configuration file You have to add IP which is blocked. For example
Debian 6.0
/etc/amavis/conf.d/05-domain - add line
@inet_acl = qw( 127.0.0.1 [::1] 187.x.x.15/32);
next restart amavis service, and should working.
I'm not sure is it correct, but in my case it's working..
|

31st March 2011, 14:57
|
|
Member
|
|
Join Date: Jul 2009
Posts: 89
Thanks: 7
Thanked 1 Time in 1 Post
|
|
Hi skangraf, thanks for reply..
When I insert:
Code:
@inet_acl = qw( 127.0.0.1 [::1] 187.x.x.0/24);
The parameter
Code:
smtp_bind_address = 187.x.x.28
is ignored...
Why??
Thanks..
|

31st March 2011, 16:24
|
|
Junior Member
|
|
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by guimnk
Hi skangraf, thanks for reply..
When I insert:
Code:
@inet_acl = qw( 127.0.0.1 [::1] 187.x.x.0/24);
The parameter
Code:
smtp_bind_address = 187.x.x.28
is ignored...
Why??
Thanks..
|
Try to add to main.cf
smtp_bind_addres = 187.x.x.28 127.0.0.1
and I'm not sure but Your @inet_acl line should be as follow
@inet_acl = qw( 127.0.0.1 [::1] 187.x.x.28/32);
or
@inet_acl = qw( 127.0.0.1 [::1] 187.x.x.28);
Don't forget restart Postfix and amavis service
|
|
The Following User Says Thank You to skangraf For This Useful Post:
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 04:20.
|
|
Recent comments
1 day 4 hours ago
1 day 6 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
2 days 5 hours ago
2 days 6 hours ago
2 days 10 hours ago