Frederick Denny (fred@freddenny.com)
v. 0.90.04 14th of Nov 2006
Background:
As the world becomes more conscious simple tasks like dropping an outgoing
e-mail on SMTP port 25 so do hackers and IT Managers.
Many times IT groups do such things as block ports using local PC firewalls and
Anti-virus solutions that try to stop trojan mail bombs etc..
In my case the corporate IT groups installed McAfee Enterprise 8 on our general
use PC's which stopped our local application from sending mail.
Note: For initial configuration of Sendmail 8.10.x and higher see: How to setup an E-Mail Relay Host with Sendmail (if you are setting up a relayed mailhost)
Scenario (Creating a
mail server that listens to SMTP ports 25 and 580):
Basically you add an option line to your sendmail.cf file. The option is
called "DaemonPortOptions".
This option that came out in Sendmail 8.10, it let's sendmail listen on multiple
ports without having to run a separate sendmail instance for each port.
When the DaemonPortOptions
is put in your sendmail.cf (or added it to your
master sendmail.mc), the sendmail daemon listens on the ports specified.
i.e. And exact line
O DaemonPortOptions=Name=MSA
O
DaemonPortOptions=Name=FredMail, Addr=134.5.175.4, Port=580, Modifiers=bh
Some examples if you want to make the changes to your master /etc/mail/sendmail.cf :
O DaemonPortOptions=Name=FredMail, Addr=134.5.175.5, Port=580, Modifiers=bh O DaemonPortOptions=Name=quickiemart.com, Addr=smtp.quickiemart.com O DaemonPortOptions=Name=MTA, Addr=134.5.175.5, Port=smtp, Modifiers=bh O DaemonPortOptions=Port=580, Name=MSA, M=E
Configuration options:
DaemonPortOptions=Name=name, Modifiers=modifiers, Family=family, Address=addr, Port=port, Listen=listen, SndBufSize=size, RcvBufSizesize
The example below shows the lines required to modify your master sendmail.mc so you can have a good template for your mail server. Remember to recompile you sendmail.mc if you modify it:m4 sendmail.mc > /etc/sendmail.cf
Some examples if you want to make the changes to your master /etc/mail/sendmail.mc :
DAEMON_OPTIONS(`Name=FredMail, Addr=134.5.175.5, Port=580, Modifiers=bh') DAEMON_OPTIONS(`Name=quickiemart.com, Addr=smtp.quickiemart.com') DAEMON_OPTIONS(`Name=MTA, Addr=134.5.175.5, Port=smtp, Modifiers=bh') DAEMON_OPTIONS(`Port=580, Name=MSA, M=E')
When you are done making your changes do not
forget to restart your mail server:
/etc/mail/sendmail stop
/etc/mail/sendmail start
fini