Mail sent from PHP Mailer or locally hosted mail server is delivered locally regardless of whether the hosted domains associated mail boy is hosted locally or on an external mail server.
This solution applies to Parallels Plesk 10 and above running on Linux
The domain domain.tld is hosted on the Parallels Plesk Panel (Plesk) server.
Mail for domain.tld is hosted on an external mail server.
An attempt to send a message through the Plesk server to a mailbox on domain.tld fails to leave the server.
Disable the mail service for the domain.tld subscription:
1. Go to Subscriptions > domain.tld > Mail > Change Settings.
2. Uncheck Activate mail service on domain and click OK.
OR do it using the command line
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -Nse"select name from domains where
parentDomainId=0"|while read i; do /usr/local/psa/bin/mail --off $i && echo "Mail service for $i
subscription has been disabled" ;done
If the previous steps did not help, check your postfix configuration with following command:
postconf | grep mydomain append_dot_mydomain = yes mydestination = localhost, localhost.localdomain, localhost.$mydomain, $mydomain mydomain = domain.tld
The mydestination parameter contains the list of domains that are delivered via the $local_transport mail delivery transport
In this case, in order to process domain.tld as external domain, you need remove $mydomain from the postfix configuration:
Create a backup of the current postfix configuration ‘/etc/postfix/main.cf’.
Remove $mydomain from the mydestination list in the configuration file ‘/etc/postfix/main.cf’ with a text editor.
Reload the postfix service in order to apply the changes: