Re: [exim] SMTP and ports 25 and 1025; was "smtp through a s…

Top Page
Delete this message
Reply to this message
Author: Arthur Hagen
Date:  
To: exim-users
Subject: Re: [exim] SMTP and ports 25 and 1025; was "smtp through a ssh ..."
On Fri, 2007-03-16 at 12:19 -0700, Easthope wrote:
> At Wed, 14 Mar 2007 23:26:46 +0100, Magnus Holmgren said,
> "If you're tunneling *from* a unix-type OS as a normal user, you
> can't use
> listen on port 25 since it's privileged."
>
> Ah!
>
> Mail is received via POP3, port 110 with no trouble.
>
> I am tunneling to Debian Linux for sending mail via
> SMTP. So apparently the problem is that the exim
> daemon is not allowed to receive messages at 25
> through a user tunnel?


No, the problem is that you can't get SSH to listen to port 25 since
it's a low port.

> So this might make a working tunnel?
>
> SSH.StartForwarding peter@??? 25:localhost:1025 ~


Since you've snipped away what you tried to accomplish, it's hard to say
whether this is an inbound or outbound tunnel.
If you want to be able to connect to port 1025 on the local host and
have this go to port 25 on the remote host, you could use the following
with openssh:

ssh -L 1025:localhost:25 user@???
(Assuming that the remote host has a daemon listening to localhost on
port 25)

If you want connections to port 25 on the remote host from the outside
to be tunnelled to port 1025 on the local host, you could use the
following with openssh:

ssh -R "*:25:localhost:1025" root@???
(Assuming that the local host has a daemon listening to localhost on
port 1025)

For the latter to work, the remote host has to have a line in
sshd_config that reads:

GatewayPorts clientspecified

Regards,
--
*Art