If your primary mail server IP address is blocked by spam-checking services (e.g., BARRACUDA, SORBS-SPAM), the best solution is to change the outgoing mail server IP address in Plesk.

On a cPanel server, this is done via /etc/mailips. In Plesk, you need to update the /var/qmail/control/smtproutes file.

Step 1: Check Hosted Domains on the Server
Before modifying the mail server IP, list the domains hosted on the server by running:

cat /var/qmail/control/rcpthosts

🔍 Example Output:

domain1.com
domain2.com
domain3.com
domain4.com
domain5.com

Step 2: Create or Edit the smtproutes File
By default, the smtproutes file does not exist in Plesk. You need to create it manually.

vi /var/qmail/control/smtproutes

Step 3: Assign a New Mail Server IP Address

Add the new outgoing mail server IP in the following format:

domain1.com:192.168.0.2
domain2.com:192.168.0.2

Replace 192.168.0.2 with your actual new IP address.
Replace domain1.com with your actual domain name.

Step 4: Restart Qmail to Apply Changes

After updating the smtproutes file, restart the qmail service:

/etc/init.d/qmail restart

Final Check:
Verify outgoing emails use the new IP by checking the mail logs:

tail -f /var/log/mail.log

✔ Use an email header analysis tool to confirm that outgoing emails are being sent from the new IP.

Benefits of Changing the Mail Server IP:

Avoid blacklisted IPs to improve email deliverability.
Prevent outgoing emails from landing in spam folders.
Enhance email reputation and ensure reliable mail flow.

By admin