Change outgoing mail server IP address in Plesk
Sometimes we face an issue that the server’s primary IP address is blocked in RBLs due to spamming or infections on the sites. The normal workaround of this situation is to fix the spamming issue or delete the infected files and submit the delist request in the listed RBLs. But some RBLs took 24 hours to 1 week to delist the IP address. It’s a time-consuming process. If you need a fast resolution of this issue, then we can change outgoing mail server IP address. Please check the following instructions to know how this can be done on different mail servers like qmail and postfix.
New Plesk Versions:
- Login to Plesk Control Panel
- Go to Tools & Settings > Mail Server Settings.
- Change the Outgoing mail mode to Send from the specified IP addresses. The other options available with this is:
- Send from domain IP addresses
- Send from domain IP addresses and use domain names in SMTP greeting
- Send from the specified IP addresses
4. Save the changes.
In Old Plesk Versions
Qmail
We can change the mail server IP address by using /var/qmail/control/smtproutes file. The steps are explained below.
1. First of all, we need to check the domain names which is hosted on the server.
cat /var/qmail/control/rcpthosts first-domain.com second-domain.com third-domain.com
2. Create the file /var/qmail/control/smtproutes and add the domains and their respective IP address using the following format.
vim /var/qmail/control/smtproutes first-domain.com:<New IP address> second-domain.com:<New IP address> third-domain.com:<New IP address>
Then Save the file.
3. Restart the qmail service.
/etc/init.d/qmail restart
Postfix
1. Edit the /etc/postfix/master.cf file and replace smtp_bind_address=1.1.1.1 with smtp_bind_address=2.2.2.2.
2. Restart Postfix.
/etc/init.d/postfix restart
Also, please note that this setting will be restored to original state after mail reconfiguration on any domain. So, use the following script in order to prevent the changes in /etc/postfix/master.cf file
#!/bin/bash /bin/grep 'smtp_bind_address=1.1.1.1' /etc/postfix/master.cf if [ $? -ne 1 ]; then /bin/sed -i 's/smtp_bind_address=1.1.1.1/smtp_bind_address=2.2.2.2/g' /etc/postfix/master.cf /etc/init.d/postfix reload fi exit 0
Read More:
If you like this post and wish to receive more articles from us, please like our FB page: Button
Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.
For more details on our services, please drop us an E-mail at info@grepitout.com
Add Comment