Avoiding Mail Blocking Firewalls

Due to recent issues with virii and the like, the IT staff at work has disallowed external pop and smtp. Well, that just sucks for me who has all personal e-mail sent off-site for a reason. So, I figured subversion was necessary. SSH forwarding is a beautiful thing. If you have a server you can ssh to and see the pop or smtp server you are looking for, you can run this script to port forward your connections locally to the desired servers after adjusting the variables at the top. Then, all you need to do is add an entry for your mail server in /etc/hosts that points to Done!

# Set up Variables
# Mail Server
# SSH Server / User
# IMAP Port
# 143 - Standard IMAP | 993 - SSL IMAP
# POP Port
# 110 - Standard Pop | 995 - SSL POP
# SMTP Port
# 25 - Standard SMTP | 465 - SSL SMTP
# SSH Commands
ssh -fL ${SMTPPORT}:${MAILSERVER}:${SMTPPORT} ${SSHUSER}@${SSHSERVER} tail -f /dev/null
ssh -fL ${IMAPPORT}:${MAILSERVER}:${IMAPPORT} ${SSHUSER}@${SSHSERVER} tail -f /dev/null
ssh -fL ${POPPORT}:${MAILSERVER}:${POPPORT} ${SSHUSER}@${SSHSERVER} tail -f /dev/null


Powered by Movable Type 4.25

About this Entry

This page contains a single entry by Skadz published on January 29, 2004 12:15 PM.

Catching Up ... was the previous entry in this blog.

You know you're a Pats fan ... is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.