Link to home
Start Free TrialLog in
Avatar of lirong
lirong

asked on

changing sendmail's port

Hi

I wish to change sendmail's port from 25 to a different port (3342).

How do I do that ?

Thanks

Liron
Avatar of jlevie
jlevie

Well my first question would be why? Changing the port sendmail listens on would only make sense if you were going to set up another sendmail (or some SMTP client) on some other machine to use the same port (nothing else will know to talk to your modified SMTP server). I think that changing the sendmail port will require a source code modification. And you'll need two copies of sendmail running for any Unix/Linux system to work (one listening on 25 and the other on your port). Other things use SMTP for alerts and notices and if the system doesn't have an SMTP server listening on port 25 there's going to be problems.
Avatar of lirong

ASKER

I want to have another application listening to this port. Isn't the port number a configuration parameter ?
I'm only aware of two cases where you'd have an application other than sendmail listening on port 25. The first would be when you a sendmail replacement, like qmail is installed. And in that case you'd simply tell the system not to run sendmail at all. The second case would be if you had an application that was going to act as a sendmail filter (like a virus scanner). Typically those are installed on a separate, dedicated, box where there is no sendmail process and they pass the filtered email stream to another system that has sendmail running. As far as I know, the only way to change the port sendmail listens on is to modify the sendmail sources and build a new copy of sendmail. The port number is neither a command line argument to sendmail nor is it a config file parameter.

Note that for a virus checker sendmail 8.10 & later provides an external hook via libmilter for filtering. That allows an un-modified sendmail to be used.
ASKER CERTIFIED SOLUTION
Avatar of markt9
markt9

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Any comment on this lirong?
sendmail -O DaemonPortOptions=Port=3342 -bd
Rejecting proposed answer.  Will come back in a week and finalize.  Please leave your recommendations here for how to finalize this question. Without recommendations, this question will be PAQ'd and the points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange
I belive I posted two ways to accomplish the question.  My answer (that spideymod rejected) is a working example.  Give up the points with a A grade is my recommendation.

Iirong is wimping out on giving out the points.....