When web apps on my VPS use the PHP built-in mail
function, some domains (like att.net) bounce emails back. /var/log/mail.log
reveals:
550 [PERMFAIL] att.net requires valid sender domain (in reply to RCPT TO command)
Basically the MAIL FROM
line is something like <user@myhost>
when it should be <[email protected]>
, so AT&T's mail server doesn't like it.
I'm not entirely sure if my /etc/hostname
file needs to be myhost or myhost.com. Any time I try to change it to myhost.com, upon reboot it reverts back to myhost.
I'm at a loss here.
EDIT:
Apparently /etc/hostname
(according to Google searches) should be just the hostname, not the FQDN. If I type hostname --fqdn
, then I get the FQDN.
Well, that was a fast self-solution!
The
myorigin
line in/etc/postfix/main.cf
was set to/etc/hostname
. I commented out that line so it defaults to$myhostname
which is set to my FQDN. All is well.