PleskPostfix

Postfix: How to change IP address for sending email for specific domain on a Plesk server

Question
How to change IP address for sending email for a specific domain?

Answer
Set Outgoing mail mode in Tools and Settings -> Mail Server Settings to one of the following:

  • Send from domain IP addresses
  • Send from domain IP addresses and use domain names in SMTP greeting
  • Send from the specified IP addresses

To set IP address for the mail service for the domain using CLI:

For Linux

Connect to the server via SSH;
Run the following command:

# plesk bin site -u example.com -mail-service-ip

For Windows

Connect to the server via RDP;

Open Command Prompt as Administrator and execute the following command:

plesk bin site.exe -u example.com -mail-service-ip

Notes:

This feature works only for Postfix mail server (not Qmail) on Linux
IP will be changed for the whole subscription (including additional domains and subdomains)
MX record for the domains will not be changed, changes will be made in Postfix transport map file – /var/spool/postfix/plesk/sdd_transport_maps.db on Linux