Secure mail through ssh tunnels

As a follow on of previous article, this one describes how to set up 2 ssh tunnels for accessing pop and smtp servers through a secure encrypted layer of communication.

Email use smtp (port 25) and pop (port 110) for sending and reading emails or alternatively imap. This time you need a secure connexion between your laptop and the two remote servers. For instance for Free, a french ISP, stmp.free.fr and pop.free.fr. SSH allows you to do that very easily through your home PC:

# ssh 110:pop.free.fr:110 -L 25:smtp.free.fr:25 your_login@home_pc

This command requires root privilege since 25 and 110 are restricted
ports. One would create a bash script in /usr/local/bin/tunnels.bash
and add it in the sudo configuration.

Now, configure your favorite mail client with:

pop: localhost
smtp: localhost

Note you can set up secure browsing at the same time.

# ssh 110:pop.free.fr:110 -L 25:smtp.free.fr:25 -L 3128:localhost:3128 your_login@home_pc

Happy secure emailing and remember it’s not because you are paranoid
that they are not all against you.

This entry was posted in Informatique, Internet, mandriva, sécurité. Bookmark the permalink.

Comments are closed.