[NTLUG:Discuss] Can sendmail listen on multiple ports?

Rusty Haddock rusty at fe2o3.lonestar.org
Thu Nov 16 01:46:32 CST 2000


Egome wrote:
    >sooOOoOOooo, if I could make sendmail listen on ports 25 AND say...2525, we
    >could BYPASS the SMTP filter.
    >
    >So, can it be done?  I have yet to find out how to make it listen on BOTH
    >ports?  Am I missing something?
    >
    >-Richard

No, you're not really missing anything, well, so far as I can tell. 
Sendmail will only listen on one port. 

Yes, you could hack the source to sendmail to listen to dual ports but
it's bad enough to hack together a .cf file by hand so it would be
obviously ill-advised to bang on the sources.  :-)

The other possibility is to run two sendmails.  One set for port 25 and
the other to 2525.  My main fear with that is of possible file collisions
in directories like /var/spool/mqueue and friends.  It probably could be
done and even safer so if the various default files and directories were
changed but that could be difficult to do right.  If you're up to it, just
try running two sendmails, one on each port.  Hmmmm... 

"Quick Robin, to the Bat Book!"

<music commences, turbines start to whine, and bizarre sound effects ensues>

[Yeah, I know I need help... :-]

Note the following line that I found lurking around in my sendmail.cf.

#O DaemonPortOptions=Port=esmtp

Remove the leading '#' and change esmtp to 2525.  Save your sendmail.cf to
a new filename, oh...  let's say sendmail2525.cf and start another sendmail
with a line something like this:

	sendmail -C {path}/sendmail2525.cf {the usual comand line options}

Well, I'm not gonna say how safe this is...  and YMMV depending on the
version of sendmail(8) you're running.  But hey, it might be worth a try. 
Then again, it might get real ugly, real quickly.  Sorta like most Cowboys
games this year.  :-(

	-Rusty-
-- 
   _____        Rusty Haddock  =  KD4WLZ  =  rusty at fe2o3.lonestar.org
|\/   o \   o
|   (  -<  O o   The day Microsoft makes something that doesn't suck
|/\__V__/           is the day they start making vacuum cleaners.



More information about the Discuss mailing list