Setting up FQDN in sendmail [closed]
For sendmail, I do two things:
- Make sure my /etc/hosts file follows the standard documented here.
- If I need to present a specific outgoing server name, I define
confDOMAIN_NAME
in sendmail.mc to reflect the right name:
define(`confDOMAIN_NAME', `mail.juicybanana.com')dnl
You say the mail server is going to be sending to the internet. That means it's going to connect to public mail servers, and the first thing it will do (as part of the SMTP HELO) is declare its own FQDN.
If you use a false or non-resolving FQDN here, a lot of mail servers are going to refuse to talk to you any further, or will use that as a strong indicator for spam even if they accept your email. You are strongly advised to register a domain name and declare a valid hostname under that, to use in the sendmail
config. If you already have a domain name, you can declare a new subdomain, and a hostname under that for this server.
The only mail servers that can get away with nonexistent FQDNs are those which are purely internal, and even then it's often so painful that I advise people to use a valid FQDN.
The recommended way is to fill the /etc/hosts with records, one for each ip address of the host, with a configured hostname of this host (with the appropriate command), so sendmail won't need to query the DNS. "He", whoever this is, is wrong. He is showing you a perfect way to shoot your own leg.