Change Mail sending IP - Postfix


Change Mail sending IP



Open the postfix configuration file, /etc/postfix/main.cf

Find if there is an entry as follows, in the postfix configuration file.

smtp_bind_address = xxx.xxx.xxx.xxx

If there isn't any entry of smtp_bind_address, you have to create it.

Change the value of smtp_bind_address = xxx.xxx.xxx.xxx to the desired IP.

Once you have made changes in the configuration file, you have to restart the postfix service.

[root@server ~]# /etc/init.d/postfix restart

You can check whether the new IP is loaded using the following command.

[root@server ~]# postconf smtp_bind_address
smtp_bind_address = yyy.yyy.yyy.yyy