How do you specify the FQDN (Host and Domain Name) that a mail server presents itself as in HELO/EHLO when sending outgoing email with sendmail?
Asked
Active
Viewed 3.4k times
3 Answers
18
I added the following in sendmail.mc:
define(`confDOMAIN_NAME', `mail.foo.com')dnl
and then:
m4 sendmail.mc > sendmail.cf
service sendmail restart
I also verified that this worked with the email verifier service at http://www.port25.com/domainkeys/ (auth-results@verifier.port25.com). Neat service, you send it an email and it replies to the from header with information about your SPF, Domain Keys, etc...
Kyle Brandt
- 84,369
10
For completeness - one can also use
define(confHELO_NAME,`something.not.the.same.as.the.domain.name')
if one needs more absolute control (e.g. in a freeb-bsd jail it may be desirable to have the confDOMAIN_NAME and MASQUERADE_AS set very different than the HELO/EHLO names.
Dw.
confDOMAIN_NAMEshould NOT be an email domain. Setting it to that will cause sendmail to reject messages because it thinks the mailboxes are (or should be) local. – Mike B Jul 07 '16 at 17:29foo.localdomainfrom showing up in email headers, try using theMASQUERADEfunctions to ensure your sent mail doesn't contain a local machine name in the headers. I got that from here (lines must be entered before anyMAILERentries) https://www.cyberciti.biz/tips/sendmail-masquerading-configuration-howto.html – armadadrive Feb 07 '18 at 16:53