Last update: $Date: 2005/01/24 23:04:25 $
In the past, when travelling I have always used kludges to get hold of my mail. It always
gets delivered to mx1.lemis.com, and I pick it up from there. The canonical way to do
this is with a POP3 client such as fetchmail, but I've never liked that. It's slow, in
my experience unreliable, and very insecure: it requires a clear text password. So instead I've
renamed the spool, gzipped it and copied it across with scp.
That's not exactly what I felt comfortable offering to my daughter Yana
when she left for a year in Europe in January 2005, so I tried to set up fetchmail and
postfix to run over an ssh tunnel. For reasons that I wasn't able to fathom, it
ran into authentication problems that didn't occur when making a direct connection. In
addition, fetchmail appears to deliver to the local MTA, postfix in this case.
Playing with the postfix transport maps made me very concerned that a change in the
domain name could result in postfix sending the newly arrived mail back again, where it
would be rejected due to a transport loop.
As a result, I gave up with POP and made a slight modification to my manual method I have
used to get my mail in the past. There are two programs:
-
packmymail moves a mail spool to a backup in the
same directory and compresses it. The backup is named after the user and the time since the
epoch. For example, /var/mail/yana might become /var/mail/yana.1106545873.gz.
It returns the full pathname of the file, or the text none if no mail has arrived.
Because it has to access the mail spool, it needs to be installed setuid.
-
getmail is a script run on the client side to invoke
packmymail
Note that the backups don't get deleted automatically. If something goes wrong, you can pick
them up again. At some point there should be a cron job to remove old backup files.
$Id: mail.html,v 1.1 2005/01/24 23:04:25 grog Exp $