adding additional sendmail process?

William Burns William.Burns at AEROFLEX.COM
Tue Apr 13 00:00:44 IST 2004


Chris has a good IPTABLES based solution.
But sendmail does have the feaure out-of-the-box. (as pointed out by Ugo)

Ugo Bellavance wrote:

> Finally, i think this
> http://www.sendmail.org/~gshapiro/8.10.Training/MSA.html
>
>Is what you're looking for...
>

In fact, on RedHat (9), doing a "grep DAEMON /etc/mail/sendmail.mc" yeilds:
 > DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
 > dnlDAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
 > dnlDAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
 > dnlDAEMON_OPTIONS(`Port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl

Changing that top line to this:
 > DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
 > DAEMON_OPTIONS(`Port=submission, Name=MTA2')dnl
Will make a single sendmail daemon listen on more than one port.
note: "submission" is set to port 587 in /etc/services. You can change
it if you like.

(first, install the sendmail-cf RPM from RedHat disk3)
cd /etc/mail; make sendmail.cf; service sendmail stop; service sentmail
start
... and you're done.
Test by running "netstat -a|grep -w LISTEN"
 > tcp   0   0   *:submission
 > tcp   0   0   *:smtp

If (for some reason) you really wanted to start another daemon process,
you could do THAT by creating a totally new file (/etc/sendmail2.cf),
and running "sendmail -C/etc/sendmail2.cf"

-Bill

Chris Yuzik wrote:

> Simple solution: set your server to listed on port 25 AND another port
> by using iptables.
>
> Try this (works on Redhat):
> iptables -t nat -A PREROUTING -p tcp -d 11.22.33.44 --dport 30 -j DNAT
> --to 11.22.33.44:25
>
> Obviously, substitute the IP address of your server for "11.22.33.44".
> You don't have to use port 30, as in "--dport 30" above, you could use
> any unused port.



More information about the MailScanner mailing list