Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 <user@myhost.com>, 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.

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.