Sendmail is an email server application that is available for many operating systems. It will listen on TCP port 25 for connections from other mail servers that use the Simple Mail Transfer Protocol for email transmissions. As a message submission agent (MSA), another common port it listens on is TCP port 587 for email transmissions from users' email clients. On a Linux system you can use the netstat or ss commands to determine if a system is listening for connections on a particular port. When I checked a Sendmail server to determine whether it was listening on port 587, I could see that it was not listening on that port, though that was needed.
# netstat -an | grep 587 # ss -ln | grep ":587 " #
When I searched /etc/mail/sendmail.mc for
RELAY_MAILER_ARGS, I saw the following
lines, which are needed to have Sendmail listen for email transmissions
from users on TCP port 587, were already present and were not commented out:
define(`RELAY_MAILER_ARGS', `TCP $h 587') define(`ESMTP_MAILER_ARGS', `TCP $h 587')
When I searched for DAEMON_OPTIONS, I saw the following:
dnl # The following causes sendmail to additionally listen to port 587 for dnl # mail from MUAs that authenticate. Roaming users who can't reach their dnl # preferred sendmail daemon due to port 25 being blocked or redirected find dnl # this useful. dnl # dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
I removed the dnl from the begining of the line so that
I then had the line below, instead:
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
I then rebuilt /etc/sendmail/mc and restarted the Sendmail
service.
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf # service sendmail restart Redirecting to /bin/systemctl restart sendmail.service #
I could then see that the system was listening for connections on port 587.
[ More Info ]
