Recently we ran into an issue where when trying to send an email on a Plesk box with Postfix as the MTA. We were having an issue sending to the main domain and their email was not hosted on the box but they were using php to send emails with a contact form.
When I looked at the logs in /usr/local/psa/var/log/maillog I seen this error pop up:
Jul 30 07:57:10 domain postfix/error: CAAC4A1A0B73: to=<firstname.lastname@example.org>
, relay=none, delay=0, delays=0/0/0/0, dsn=5.0.0, status=bounced (User unknown i
n virtual alias table)
This is is saying that postfix is bouncing the email because that email doesn’t exist on the server. So I immediately thought this was an issue with the mailbox on Plesk being enabled, so I made sure that was unchecked and it was. After searching it appears that if your hostname is the same as a domain on the server then postfix will still try to send it locally. To fix this you simply have to change your hostname. If you log into plesk and go into server settings you should change it there and then just reset postfix after that with:
Once it comes back up you should be able use your contact form and get a copy sent to that domain again.