- Plesk for Linux
- Messages sent by PHP script are not delivered;
- There are the following records in
CONFIG_TEXT: postfix/smtp: 0057981389: to=<email@example.com>, relay=mail.sender.com[203.0.113.2]:25, delay=4576, delays=4576/0/0.16/0.04, dsn=4.1.8, status=deferred (host mail.sender.com[203.0.113.2] said: 450 4.1.8 <firstname.lastname@example.org>: Sender address rejected: Domain not found (in reply to RCPT TO command))
- The sender domain does not have MX record:
# dig sender.com MX +short
Missing MX record.
If Plesk DNS server is used, add MX record for the domain using the article How to add a DNS record for a domain in Plesk?
In case an external DNS server is used, it is required add the appropriate MX records on Registrar side.
Note: it is required to wait for the DNS propagation period. It may take up 48 hours, but mostly faster.
As a workaround, it is possible to adjust Postfix configuration and specify valid sender using the following steps:
- Connect to the server using SSH.
/etc/postfix/main.cfin a favorite text editor and specify new valid sender under my hostname parameter:
CONFIG_TEXT: myhostname = newexample.com
- Restart Postfix:
# service postfix restart