• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Change Qmail's ip-address?

R

Ronaldve

Guest
How do I change the ip-address qmail uses to send it's emails?
I want to change it to another ip-address on the same machine.
 
Qmail, by default, uses the IP configured for the MX of the domain sending e-mail out for sending e-mail on each domain it's responsible for. The easy answer would be to update your MX dns to represent the IP you want to send from.

A slightly more confusing one would be to patch Qmail with a specific patch to require only the specified IP be used. This patch is available via the qmail website, but the sources to the "plesk" version of qmail is not publicly available. Their patches, however, are. So you should be able to re-build the plesk version of qmail with very little trouble.

For anyone that doesn't want to take a few hours in this process, the easier way would probably be the best route. Merely update your DNS records for your MX settings (i.e. mail.domain) to be the primary IP or the other IP of the box.)
 
Ok, I've changed the mail.<domain> ip to another ip on the same machine, but now I cannot send email with that domain.
"telnet mail.<domain> 25" does not works, it gives a timeout.
I'm not blocking port 25 on that ip so it can't be the firewall.
 
From what I've seen, qmail setups on Plesk do not lock to a specific IP and listens on all IP's bound to a NIC, but when the smtp server sends email, it will always use the primary IP. If you want to lock email to a specific IP, lock it to the Plesk administrative (primary IP), set all domains's MX records hosted by the box to the primary IP, that should be good enough. If you want to go even further you can play with the firewall to only allow mail to the one IP. In normal Qmail setups there are ways to lock it to a specific IP, not sure with Plesk w/o looking at the control files/rc files myself.
 
Back
Top