qmail hacking
Thursday, October 11, 2001, at 10:10PM
By Eric Richardson
So tonight I had to figure out a very quick way to get email into a host inside the USC network. This wouldn't seem to be a problem, except that USC blocks port 25 traffic at some router level. Hackery was definitely called for, as ISD was probably going to be far slower than was acceptable for our purpose. Click for details...
Basically, I needed to get trojanvision mail to the trojanvision server. Luckily, I could deliver mail to the hostname through USC's email server, so I was able to use that as a transport.
I set the machine I'm hosting the dns on to be the mx for trojanvision email. I then made the domain a virtualhost, mapped it to eric-tvtv, and set up a .qmail-tvtv-default in my home dir. This file forwards mail onward to a mail proxy account i set up at tvtv.usc.edu. I pointed the proxy account at a little script I wrote to take the email, dump it to a temp file, and then use qmail-inject to dump the message (totally intact, nothing touched) into the tvtv qmail server. From there it's just like local delivery, with vpopmail routing the virtual domains as they should be.
It's definitely a hacked together, duct taped solution, but it's a fun one.