[Users] configuring IMAP over SSH tunnel

Davide Mancusi arekfu at yahoo.it
Thu Jun 5 14:41:52 CEST 2014


> Before starting claws-mail I open a ssh-connection in a separate
> terminal window (actually with an alias):
>
> ssh -L 2525:local-smtp-ip:25 -L 1143:local-imap-ip:143 public-ip
>
> Of course you could use numerical IP-address or FQDN for local and
> public IP addresses.
> If the smtp- or imap-server is running on the same machine as the sshd
> you could use "localhost" as address for local-smtp-ip or local-imap-ip.
> [...]

Tobias, thank you for sharing. This is exactly what I do, and it works
if I start the tunnel from a separate shell. It doesn't if I use the
configuration field.

> Of course there is this slight disadvantage that without resetting the
> account data for the SMTP and IMAP services I always have to use the
> ssh-tunnel from this client PC no matter whether I'm on the road or
> have LAN access. In my environment this doesn't matter but you should
> check your access to the public IP from your LAN.

Well I thought I might get away with a script that checks my current
IP and calls nc if I'm on the LAN at work. I do something similar for
tunnelling ssh connections and it works fine.

Cheers,
Davide



More information about the Users mailing list