The ability to use email from an off-site location, while using your Truman email address, may be somewhat difficult to accomplish if your ISP does not allow email relaying. If you have had trouble setting up email for your Truman account using your ISP's SMTP server, one solution may be to tunnel your email data into the Truman network using SSH and use their mail servers. The script shown below is one that I wrote which allows me to use email from my home over CableONE's cable internet service.
Example C-1. email-tunnel.sh
#!/bin/bash # Set up a tunnel ssh email@example.com \ -L8143:studentpop3.truman.edu:143 \ -L8025:mail.truman.edu:25 \ 'sleep 30;exit' & # Run your favorite email client evolution &
This script does two things. The first is that it forwards two ports on the local computer via xenon to two computers on the Truman network. The second is that it starts an email client to use those ports.
-L option determines the port
forwarding. The ports that are forwarded are:
Local port 8143 is forwarded to port 143 on studentpop3.truman.edu. Port 143 is the standard port for the IMAP protocol. (If you intend to use POP3 to retrieve your email instead, you would likely want to map local port 8110 to port 110 on studentpop3.truman.edu instead.)
Local port 8025 is forwarded to port 25 on mail.truman.edu. Port 25 is the standard port for delivering email.
Anytime a computer program tries to connect to port 8143 or 8025 on your computer, that data will be forwarded via the ssh tunnel to the appropriate computers on the Truman network.
One neat feature of ssh is that it allows the connection to stay open as long as an application is using the port forwarding, even if the interactive terminal session is over. So, when the script automatically runs the exit command after 30 seconds, the terminal session is over, but I can still transmit and receive data over the forwarded ports.