Reaching Valhalla via Port 25 (over SSH)

Posted on December 06, 2005

I was infinitely proud of this last hack on OS X that seems to work. I wanted to send email from an arbitrary wireless or wired IP address from Mail.app. So, here’s what I did… I issued this command to route port 25 from suudsu to hudge!

sudo ssh -L 25:localhost:25 hoyhoy@hudge

Hudge is where involution.com is hosted and runs a mail server. So, I redirect my Powerbook’s port 25 to hudge, and configure Mail.app to use localhost as it’s outgoing sendmail server over an encrypted link via SSH I’m syncing my Powerbook to Gmail’s POP access (over SSL). Involution.com’s mail (*@involution.com) that is not stopped by Spamassassin, Bogofilter, DCC, or my custom virus notification and unreadable character set filters is forwarded to GMail if it’s not something that was sent from within gmail, and mails sent to hoyhoy@example.com are forwarded back to hudge which implicitly creates a backup. Also, I setup Mutt to BCC sent mail to GMail so it’s included in the archive. The only one that I haven’t figured out is how to make Mail.app BCC sent mail to Gmail, and how to make GMail send it’s sent mail back to hudge. I know there’s ample sendmail foo to be messed with, and I imagine it’s possible to replicate based on the fact that it knows when an email is coming from the Mail.app MUA and tony@involution.com, it is safe to mirror that to my user account on hudge. Similarly, I think I can actually hack Eric S. Raymond’s “fetchmail” program to download emails that I sent from GMail over POP3, and only grab any email that I didn’t send to myself, and archive it on hudge. These are automatically in Mail.app because it syncs to GMail POP3, and sent email is part of what’s downloaded. So, basically, I’m left with emails I sent from Mail.app only being in Mail.app, and email sent from GMail only going to Mail.app and not hudge, but everything else is mirrored everywhere. I used to keep Outlook running on Windows too, but I’ve since stopped being part of that whole scene about four years ago. I transferred all of my Outlook email over to Berkely format and use pine to look through it, on the rare occassion I need an email from before 2002. If only I could somehow get all of that imported to GMail, but that’s another story. Someone needs to write a GMailFS driver to where I can simply drag .eml files or entire mbx files and have them import.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. [...] Administrator at Involution has done something really clever with Mail.app, SSH and port redirection. [...]

Comments