Saturday, March 8, 2014

Switching Fedora 20 sendmail from port 25 to port 587

My fedora server sends outgoing email to  I've always been able to configure that with just this in /etc/mail/

define(`SMART_HOST', `')dnl

But two days ago Comcast finally started blocking port 25 on me (

There are quite a few posts and articles about switching to port 587.  Below is what I found worked on my Fedora 20 server.

Step 1.  New /etc/mail/ config setup:

define(`SMART_HOST', `')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl

Step 2. Setup authinfo

Assuming your comcast account is with password door123 ...

# touch /etc/mail/authinfo && chmod 600 /etc/mail/authinfo
# echo ' "U:walrushose" "P:door123" "M:PLAIN"' > /etc/mail/authinfo
# makemap hash /etc/mail/authinfo < /etc/mail/authinfo
# chmod 600 /etc/mail/authinfo.db

Step 3. Remake and restart sendmail

# make -C /etc/mail
# systemctl restart sendmail.service

Now my server is happily using port 587 for outgoing email.

1 comment:

Anonymous said...

Thanks a ton!