Sendmail MTA is a mail transfer agent (MTA) responsible for managing the sending and receiving of emails on mail servers. It is one of the oldest and most widely used mail servers on Unix and Linux systems.
Originally developed by Eric Allman in 1983, Sendmail has been a cornerstone of email infrastructure for decades.
The HELO is the identifier that the mail server uses when introducing itself to other mail servers, and changing the HELO (or EHLO) in Sendmail is a task that can be done by modifying the configuration, either from the sendmail.cf file or the sendmail.mc configuration file, and then regenerating the sendmail.cf file.
First, you'll need to open the file with an editor:
# nano /etc/mail/sendmail.mc
Then edit or add the line with the desired FQDN for the HELO:
define(`confDOMAIN_NAME', `server.domain.com')dnl
Regenerate the configuration file:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
And restart the service to reload the new configuration:
# service sendmail restart
To ensure that the HELO has been changed correctly, you can check the Sendmail logs or send an email and review the header of the received message on the receiving server to see how the HELO/EHLO is presented. Alternatively, you can simply use ncat to make a connection to the SMTP port on localhost:
# nc localhost 25
You should see line 220 with the entered HELO:
220 server.domain.com ESMTP Sendmail 8.15.2/8.15.2/Debian-18; Tue, 30 Jul 2024 19:23:50 +0200; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
Make sure that the name you use for the HELO/EHLO is correctly configured and valid. The FQDN must have a DNS record pointing to the server’s IP address, and the rDNS/PTR must match the HELO. Some mail servers may reject emails if the HELO/EHLO does not correspond with a valid record or if proper reverse resolution cannot be made.
We hope this article has been helpful 🙂. Remember, if you have any questions about this or any other issue related to your servers on Clouding, feel free to reach out to soporte@clouding.io We're here for whatever you need!