Mail out from GPRS or from... anywhere
Since I still haven't got ADSL at the new appartment , I rely again (as in old times on Limnos) on a GPRS connection through my mobile phone to receive and send mail. Hmm, that "send mail" part is actually the interesting bit. Nowadays it can be hard to actually send mail when you're not in any "normal" Internet situation. For example: spam blocks on dynamic ranges of IPs let many mail servers not accept mail from my GPRS connection, while other mailservers do greylisting and that is inconvenient when you're relying on short timed and expensive connections . But there is one setup that is almost guaranteeing that you get your mail out...
It's complicated and voluminous though: I went and set up STARTTLS and SMTP AUTH on my server (running sendmail), then went and set up the same on my MacBook (with postfix). That way I'm sending out mail exclusively through my own mail server, so I can control access and let the betabug.ch server handle the heavy lifting to talk to other servers. Here are a few notes.
For sendmail on openbsd: To set up STARTTLS, the starttls(8) manpage will take you by the hand and walk you through the necessary steps. It's easy enough. Setting up SMTP AUTH involves two steps, first installing and configuring the cyrus-sasl port, then recompiling sendmail given the WANT_SMTPAUTH=Yes environment variable and reconfiguring that. I'm not going to write another howto on this. I'd like to mention though that I enjoyed the option to have SASL authenticate against my IMAP server -- like that I don't have to set up yet another set of logins, or use system passwords (I don't like to mix ssh logins with mail logins).
Postfix on Mac OS X wasn't too hard either. Again howto's abound on the web. Whenever I have to configure postfix I think how funny it is that postfix users claim the configuration is easier than sendmail's, when in the end you have config files with tons and tons of almost similar options -- so you have to look everything up anyway. Never mind, it worked with minimal fuss.
Last step was -- of course -- to check that my server config is still locked tight and no relay was opened by mistake.
So in the end postfix and sendmail encrypt their SMTP connection, postfix authenticates at sendmails end, where SASL hands over the password to uw-imap for authentication. All that in order to simply send a couple of mails now and then.
1: Hey Vivodi, don't you think it's about time to get your act together? This game starts to get boring.
2: Yahoo... I had tried for almost an hour to send a mail to a yahoo customer. They do greylisting nowadays. But they have a ton of MX servers, so my laptop's mail server tried to contact another one for each retry and never got around the greylisting.