Koozali.org: home of the SME Server

Running SMTP on alternate port

Larry Helber

Running SMTP on alternate port
« on: August 27, 2002, 10:36:42 AM »
My ISP blocks incomming SMTP port 25.  I use  a dynamic DNS service (TZO) and they receive my email and reroute it onto another port for me.  This worked fine on my old system.  Now I need to setup the new SME server to do the same thing.  What do I need to do to get SMTP to receive mail on a different port?

Nathan Fowler

Re: Running SMTP on alternate port
« Reply #1 on: August 28, 2002, 07:12:09 AM »
See http://forums.contribs.org/index.php?topic=5233.msg18479#msg18479

This same program can be used for redirecting another user-defined port to local port 25.

Thanks,
Nathan

Larry Helber

Re: Running SMTP on alternate port
« Reply #2 on: August 28, 2002, 08:23:01 AM »
Thanks, I tried your program and it does work.  Now please excuse this simple question but where and how would be the best place to put your program and how can I get it to start with the proper arguments.  I am still trying to figure out how and where to put everything so it will start on a reboot.

Nathan Fowler

Re: Running SMTP on alternate port
« Reply #3 on: August 28, 2002, 06:29:06 PM »
Ok, do the following:


Download the program, copy the .tgz to /root.  I am going to assume you want to foward your new SMTP port 2525 to port 25 (Original SMTP port).  You would change 2525 to suit whatever port you were wanting to forward.

From Console:
cd /root
tar -zxvf redir*.tgz
chmod 755 redir
mv redir /usr/local/bin/redir

You have now "installed" redir.  To execute Redir issue the following command:

redir --lport=2525 --laddr= --cport=25 --caddr=127.0.0.1 --transproxy

This will redirect 2525 on the external interface to 25 on the internal interface.  This should allow you to receive mail on TCP 2525.

Hope this helped,
Nathan

Nathan Fowler

Re: Running SMTP on alternate port
« Reply #4 on: August 28, 2002, 06:30:14 PM »
To keep this program spawned on reboot, add it to /etc/rc.d/rc.local at the very bottom.  Be sure to use the full path to the executable, IE:

/usr/local/bin/redir --lport=2525 --laddr= --cport=25 --caddr=127.0.0.1 --transproxy