I am playing with the thought of using IMAP to send email from
my mobile clients. The way this works is that mail is actually
placed into a Maildir locally and synchronised with the IMAP server
using a tool such as offlineimap. The
Courier IMAP server
supports such an outbox feature, for other servers you can use
inotify or a cron job (I am planning to
publish a writeup about my new mail setup sometime soon, so no
scripts linked here yet).
Anyway, it’s trivial to get it working, and Dann Frazier has written it all up. The question is more whether I want to, or not. I am soliciting feedback.
The advantages of using an IMAP-synchronised outbox are:
-
The ability to review all mail to be sent while still offline. Using mutt, you can even edit them after “sending” but before they are actually sent.
Undoubtedly, doing this often should be a hint to take more time before sending a message. However, at times there are good reasons why one might want to change a message which was composed e.g. on the plane (or not send it at all), and having to remove the message from the MTA queue and recreate it with the desired changes is unnecessarily time-intensive.
-
Wherever you may roam, you can send mail even if port 25 is blocked (provided that the IMAP or SSH ports are open).
-
All your mail is sent by a single host, so you don’t have to worry about blacklisted IPs or disclosing information about your whereabouts.
-
It’s trivial to post-process mail, including training spamfilters with it (as ham) through a server-side pickup script, as well as e.g. checking for missing attachments locally (you need a local
sendmailscript for reasons documented here).
Any solution with advantages comes with disadvantages, and these are:
-
Added complexity and brittleness: having
muttpipe mail to a customsendmail-replacement script, which puts a message in place for synchronisation withofflineimap, and a server-sidecron-job calling another custom script which pipes the mail(s) to be sent to the realsendmailbinary all just seems a little less trustworthy than good ol’ postfix delivering mail via a TLS-encrypted, client-cert or SASL-authenticated SMTP channel to a known mail relay. -
It’s non-trivial to get meaningful notifications in case delivery of a message failed.
-
Messages are only sent after IMAP synchronisation carried the mails to the server and the server-side pickup process sent them on. In my setup, this could introduce a delay of 30 minutes even when online, which may be rather undesirable in urgent matters. On the other hand, such delays could easily serve to reduce stress levels (I realise that’s not a problem with a technical solution though).
Can you think of any other advantages or disadvantages? Do you use an IMAP-synchronised outbox and would like to share your experiences with me? Or do you have yet another solution? Write to me!
NP: OSI: Free

