Change IP of outgoing SMTP server


Change IP of outgoing SMTP server. Sometimes you need to have a number of different IPs so that it definitely divides on right your marketing communication with regular transaction emails. Because transactions email should arrive very well with right reputation should in no case these two mixed through 1 IP and thus communication should be divided IP. Or this method is also applicable if you want to replace an IP by any reason.

In this file you need to

vim /etc/postfix/sdd_transport_maps.regexp

define per domain or per email sender IP


/@vindazo$/ vindazo:

vim /etc/postfix/main.cf

Here you need to determine internal interfaces.

inet_interfaces = localhost, 188.40.155.250, 188.40.155.XXX, ezev..


Sometimes

smtp_bind_address = 188.40.155.223

Here you say which IP should send which domain or sender


vim /etc/postfix/master.cf


vindazo unix - - n - smtp

-o syslog_name=vindazo.be

-o smtp_helo_name=vindazo.be

-o smtp_bind_address=188.40.155.XXX



Don't forget to restart the service


service postfix restart


Also know that if you have changed an IP then you have to warm it up and if you immediately start sending more than 1000 your transmission will be blocked by providers like Microsoft.

So, you can view current que with command like.
 
mailq


and remove al emails from que with


postsuper -d ALL

Comments