Configure Sendmail to listen on multiple ports
Friday, February 22nd, 2008
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 nice too.
Anyway, 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 (quite understandably, I might add).
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.
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 Redhat 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 should 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 should be good to go.

Your comments are welcome
Comment notes
<a href=""> <b> <blockquote> <code> <em> <i> <ol> <li> <strike> <strong> <ul> <pre lang="" line="">