how to configure postfix to send mail as another FDQN and on another IP address?

Hello,

My IP address is in a bad network block where spammers used to operate, and so my email gets blocked by the godaddies and the like. My ISP gave me an IP address from their clean network block to help my mail gets through.

However, I am not sure how to go about this. He said I should add the IP address to my network interface as an alias and to tell postfix to send mail on that ip with another mail name.

For this post, we’ll say that he gave me the ip address 1.2.3.4 ; and the FDQN for that IP is mail1.example.com. I have reverse DNS for mail1.example.com ; so this part is all configured and ready to be used.

I added the following in /etc/network/interfaces:

iface eth0:1 inet static
address 1.2.3.4
netmask 255.255.255.255
network 1.2.3.4
broadcast 1.2.3.4
gateway z.z.z.z
dns-nameservers 127.0.0.1 z.z.z.z y.y.y.y x.x.x.x.
dns-search xxxxxxxxx.com
# dns-* options are implemented by the resolvconf package, if installed

(I removed the ip addresses and domain names for security reasons in this post)

Next, I configured /etc/hosts so that 1.2.3.4 is associated to mail1.example.com.

Next, he said I should configure Postfix to send mail as mail1.example.com and on the 1.2.3.4 IP address

I found in “Webmin -> Servers -> Postfix -> General settings” that I can change the server name for outgoing email, but will it also change the ip address? Is there something else I need to do?

Thanks for any help

Cheers

Howdy,

I believe what you’re trying to do can be accomplished using these two Postfix config options:

http://www.postfix.org/postconf.5.html#smtp_bind_address

http://www.postfix.org/postconf.5.html#inet_interfaces

You can probably get what you’re after with the first option above, the smtp_bind_address setting, that you can setup in the /etc/postfix/master.cf file.

-Eric