Mails not send from WordPRess
I have verified that postfix is installed and that I can successfully send emails using echo test | mail firstname.lastname@example.org, and the email arrives as it should.
However, when I try to send an email from WordPress (Contact form 7, or Test Email plugin, the emails do not arrive.
The problem seems to be with the rejection of the domain of the sender address by staysecuregroup.com, where the sender address is www-data@WP-NewBase-052814.
The domain WP-NewBase-052814 doesn’t exist, and this is why staysecuregroup.com rejects it.
But how can I control what this Sender address is? My droplet was created from the standard “WordPress-App” disk image from DigitalOcean.
In /var/log/mail.log I see:
Jan 19 08:19:17 energy postfix/pickup: 99446628B1: uid=33 from=<www-data>
Jan 19 08:19:17 energy postfix/cleanup: 99446628B1: email@example.com
Jan 19 08:19:17 energy postfix/qmgr: 99446628B1: from=www-data@WP-NewBase-052814, size=766, nrcpt=1 (queue active)
Jan 19 08:19:17 energy postfix/smtp: 99446628B1: host mx10-se.staysecuregroup.com[126.96.36.199] said: 450 4.1.8 www-data@WP-NewBase-052814: Sender address rejected: Domain not found (in reply to RCPT TO command)
Jan 19 08:19:17 energy postfix/smtp: 99446628B1: firstname.lastname@example.org, relay=mx10-se.staysecuregroup.com[188.8.131.52]:25, delay=0.32, delays=0.05/0.03/0.2/0.04, dsn=4.1.8, status=deferred (host mx10-se.staysecuregroup.com[184.108.40.206] said: 450 4.1.8 www-data@WP-NewBase-052814: Sender address rejected: Domain not found (in reply to RCPT TO command))
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.