Can sendmail listen for SMTP on two prots at once?

Marcin Jessa lists at yazzy.org
Wed May 10 16:41:23 UTC 2006


bOn Wed, 10 May 2006 16:03:13 +0800
"fooler" <fooler at skyinet.net> wrote:

> ----- Original Message ----- 
> From: "User Ernie" <ernie at puremail.eis.net.au>
> To: <freebsd-isp at freebsd.org>
> Sent: Wednesday, May 10, 2006 11:17 AM
> Subject: Can sendmail listen for SMTP on two prots at once?
> 
> 
> >I am trying to work out a roaming solution for clients with notebooks that
> > don't like webmail and need to send outgoing emails via one of our SMTP
> > servers. At the moment I have a POP befor SMTP solution running which 
> > works
> > fine except more and more the clients are finding that outbound port 25 in
> > the hotels they stay at is blocked. I was trying to come up with a way to
> > get sendmail to listen on two ports at once the normal port 25 and a port
> > number above 1024 for the roaming users.
> >
> > Anyone have an idea how to achive that or another roaming suggestion to
> > bypass the hotel blocks?
> 
> you have lots of options here...
> 
> 1. run two sendmails.. one binded to port 25 and the other one binded to 
> above port 1024 (but i prefer to use port 80 because most firewalls allowed 
> port 80 to pass thru)
> 2. run one sendmail that binded to port 25 and make a firewall rule to 
> redirect or forward port 80 to port 25
> 3. using dial-up vpn
> 

No need to run yet another instance of SMTP.
Just use a little netcat trick for that. 
Install /usr/ports/net/netcat or use the one from base, 
put something like following line to /etc/inetd.conf and start inetd:

x11             stream  tcp     nowait  root    /usr/local/bin/nc      nc -n -w 3  127.0.0.1 25

This will accept connections to x11's port - 6000 and 
forward them to port 25 on localhost.


Cheers,
Marcin.
 


More information about the freebsd-isp mailing list