Configure Sendmail to listen on multiple ports

I'm not a fan of Sendmail, as anyone I've worked with can attest to. There are other MTAs out there that are every bit as capable while being much easier to work with. I like Postfix, personally, but Exim is pretty decent too.

I was recently tasked with configuring Sendmail to listen on port 587 as well as port 25 for the use of some of the system’s users who found their outbound port 25 access restricted on their new home cable modem.

A few minutes Googling for help showed me that there's a real lack of clear instruction out there on this. Some instructions say to edit sendmail.cf directly, which is a bad idea, while other say to comment out FEATURE(`no_default_msa',`dnl') before adding the additional port configuration. This last caused the MTA to stop listening entirely (oops). So here's what I did to get Sendmail to listen on the additional port 587 as well as the default port 25. This was done on a Red Hat system but should work on any distribution running Sendmail.

In /etc/mail/sendmail.mc, you need the following two lines:


DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl

The second line may already be there, but commented out. This enables listening on port 587. The first line is required if you want to also continue listening on port 25, which is necessary if this machine receives mail from the public at large.

Reload sendmail and you’re ready to go.

What is a corvid?

Corvidae is the family of birds that contains crows, ravens, magpies, and jays, among others. Widely considered to be the most intelligent of the birds, they live in complex social groups and take part in elaborate games. Various members of the corvid family have demonstrated self-awareness, the ability to memorize, and they are even known to create and use simple tools.

Found nearly everywhere on Earth, corvids have played an important role in art, literature, and mythology throughout history.