Postfix and myhostname/mydomain
I currently have Postfix running on a box that also hosts a number of websites. Although the website domains' DNS all have an A record pointing to this server, the server has no hostname of its own. The Postfix is used for outgoing SMTP only; incoming is handled by Google Apps. All outgoing mail is signed by OpenDKIM, and SPF is enabled as well.
The question is, does the server needs its own hostname, especially for Postfix? I've heard conflicting advice about whether Postfix needs to have a real FQDN set for myhostname/mydomain to prevent messages from being classified as spam.
So far, I do not seem to be experiencing any issues with a default 'server.localdomain' hostname. Is it OK to keep using this, or should I look to get a real domain just for the server?
Solution 1:
In order to deliver mail to the more critical mail systems on the Internet, having Forward-confirmed reverse DNS is of some importance.
Note that this is unrelated to, and separate from, what postfix thinks its hostname is - it is purely DNS-related.
Solution 2:
There certainly are mail servers out there that will refuse to deliver mail that is sent from .localdomain. It is also impolite to send out mails such that you cannot easily find a domain to send abuse@ to.
This only means that the mails should be sent with a proper recipient in the SMTP dialog. If your software does not do this, it will be set by Postfix using myorigin.