Jun 19 2003
Cool Unix Sysadmin Tip of the YEAR!
Got a Unix server running sendmail? Have your users complained that they can’t send mail when connecting from major dialup ISPs? This is because most major ISPs now block port 25 to foil spammers (port 25 is where sendmail listens for SMTP connections from your PC – as well as inbound mail from other servers on the internet). What is the fix? Run a second instance of sendmail on a different port – one that is not blocked by these ISPs. Note that you need to keep the instance running on port 25 to receive inbound mail.
Here is how to do it:
Copy /etc/sendmail.cf to another file name (sendmail.cf-6000 in this example)
Edit the DaemonPortLines line
>#O DaemonPortOptions=Port=smtp, Name=MSA, M=E
>O DaemonPortOptions=Port=6000, Name=MSA, M=E
Start the second instance of sendmail with this command
>sendmail -bd -C/etc/sendmail.cf-6000 -q5m
Now have your users set their mail clients to sent via SMTP on port 6000 instead of port 25.