Saturday December 5, 2015

OMG My IMAP Mailboxes are Gone!

I have never cared for the "store mail on the server" model of IMAP. Disliking this from an academic standpoint, I had avoided using IMAP as much as possible. However, I recently decided that I wanted to use email on both my desktop and my laptop.

Thanks to recommendations from knowledgeable friends and acquaintances who insisted that IMAP was really the only way to keep my mail clients in synch on multiple computers, I grudgingly converted to IMAP a few weeks ago. And it was working.

Mail was being delivered to ~/Maildir and I was getting it on both machines. I set up server-based mailboxes and moved all of my "On my Mac" messages to the server. Filed messages were now accessible in both locations. All was fine.

But then, I decided to improve things.

[...Pause while the reader considers the ramifications of that statement and either gasps, sighs, or chortles...]

I decided to let OS X Server handle Mail services.

At which point:

  • Apple, in its infinite capacity to believe that they know better than anyone else (and standards be damned) has configured Dovecot under X Server to deliver mail to a, shall we say, neither well-known nor well-documented place, certainly not ~/Maildir. **

  • Postfix has determined that mailbox_transport outranks home_mailbox (and in all the verbosity of Postfix, it never bothered to tell me that my home_mailbox directive was being overridden).

  • IMAP, for reasons better left undebated, believes that the Server Is The Source of All Truth (even though the user has no control over the server.) So, when my on-disk mailboxes weren't in sync with the server, the server's (0-length) index of mailboxes won.

  •, which as of Yosemite (10.10.5) has been whinging at me every time I delete more than a few messages from my Junk mailbox (Are you Sure???) saw no reason to alert me before deleting 100 mailboxes (containing several thousand messages) from my disk.

As the day wore on and my frustration mounted, I finally realized that nothing in my ~/Maildir had been updated since 5pm... then I had to track down why home_mailbox was (just now) being ignored, where the Dovecot config was, where the mailboxes were... and then copy all of my "folders" (fauxlders: named with a leading . and . separators) to the new location and then convince Dovecot to re-index everything,

I still dislike IMAP, now with even more Actual Reasons!

** Dovecot delivers mail to obfuscated subdirectories of /Library/Server/Mail/Data/mail/ which are readable only by user _dovecot (not dovecot). Before you go mad trying to figure out which directory matches which user, check the symlinks under the (also readable only by _dovecot) directory, /Library/Server/Mail/Data/mail/users. (Why, Apple, why?? What possessed you to name the directories, e.g., 1E4212DD-ACAA-4E46-BFFF-41BDF4285BC9?)

The Dovecot config values are in /Library/Server/Mail/Config/dovecot/conf.d/10-mail.conf. I could change them, but I don't trust Apple not to overwrite that change in a future update and it was difficult enough to merge my mailboxes back into their choice of mail_location and location (yes, they set both; that's where the symlinks come in) the first time.

[Edit: Dec 9] A friend (who was trying to rationalize excuse explain why disappearing my folders without confirmation was understandable said, "You don't expect Dropbox to alert you if 100 folders are being deleted, do you?" Well, yes, actually, I do. Because Dropbox does. It saves the deleted files on the server and it sends me email about the deletion. Also? I control the server side of Dropbox, unlike IMAP. So, yeah. If you compare Dropbox to X Server + IMAP +, Dropbox wins.

OMG My IMAP Mailboxes are Gone! ( in category SciTech , Trivial Pursuits ) - posted at Sat, 05 Dec, 15:44 Pacific | «e»

Post a comment

Any posted comments will be viewable by all visitors. Please try to stay relevant ;-) If you simply want to say something to me, please send me email.

All comments will be moderated. Thank you for your consideration.