Hacker News new | ask | show | jobs
by avar 3342 days ago
I use OfflineIMAP to fetch & emacs/mu+mu4e+exim to read+index/search+send my E-Mail. It works, and overall I'm happy with it.

I used to use mbsync but when my employer migrated from Cyrus to Exchange IMAP I couldn't get mbsync to work with it, but OfflineIMAP worked just fine.

Now they've migrated to GMail, which works fine with both, and even though OfflineIMAP is more flexible & easier to customize I'll probably switch back at some point.

OfflineIMAP regularly pegs my CPU at >100% just downloading a few dozen E-Mails, whereas mbsync's CPU usage never went above 2-3%. When my laptop fan starts spinning it's usually OfflineIMAP in the background.

So if you're looking for an IMAP->Maildir retriever or backup solution consider trying out mbsync first.

It's a PAIN to switch between these programs, or even using the same data when switching between different servers (e.g. Cyrus -> Exchange). Inexplicably neither of them have some sort of reindexing mode where they can take an existing Maildir and reconstruct their local database from local/remote Message-Id's. They both use & maintain an opaque local database. That's why I haven't simply gone back to mbsync.

3 comments

> So if you're looking for an IMAP->Maildir retriever or backup solution consider trying out mbsync first.

I'll second this: I used OfflineIMAP at first, but switched to mbsynrc after being unhappy with OfflineIMAP's performance. (It also seemed to hang semi-sporadically for me, which made it a pain to launch as a cron job.)

Lots of factors affect which tool is the better for a given user, of course, but I personally have been happier with mbsynrc.

There is the future version of offlineimap called https://github.com/OfflineIMAP/imapfw
Are you using the OfflineIMAP SQLite driver? If not, the maintainers did say it was more performant and reliable than using text files which was the default before version 7.
Yes, I use the SQLite driver, and use & regularly pull the latest version from the git, 7.1 right now.

I haven't dug into why it uses that CPU in any detail. Looking at its output / tcpdump of what it's doing it goes to >100% CPU for 10-30 seconds when it's finished fetching the status from the remote & is presumably in some tight inner loop comparing it with local data to decide what to do before it starts downloading messages, and then briefly spends a few more seconds at >100% after the messages are downloaded, presumably updating its local state.

When it's just issuing IMAP commands or downloading messages from the remote it sits at 1-5% CPU.

As I pointed out OfflineIMAP works just fine for me, but in retrospect I'd be happier if I had stayed with mbsync. I don't need any feature from OfflineIMAP that it doesn't have, and it both uses less CPU/Memory & it finishes deciding what to download & downloading it in way less time.

I have just checked how much it uses on my side: doesn't go above 50%, but I do consider that pretty high and can totally understand how it could use 100% with bigger mailboxes. For me, this was never a problem since I only run it once daily for backup.

Thank you for mentioning mbsync, I will keep it in mind.

I'm in a situation similar to the one you were in (mu4e, Exchange IMAP at work), and mbsync (version 1.2) works for me. Not sure what Exchange version is there, and I had to configure it a bit both initially and after an MS Exchange update -- but just some basic settings, such as `SSLType STARTTLS`, setting CertificateFile manually, `AuthMechs LOGIN`.
I like mu4e because it integrates with orgmode well. However, it is not the best client for managing Exchange meeting invites and plain text responses are not very readable in outlook. Were you able to solely rely on mu4e without using Outlook?
Yes, and I've actually never used Outlook with Exchange. But I'm only sending plain text responses, not trying to use any advanced features, and it works fine to receive and read meeting invites (just as messages).

What goes wrong with plain text responses in Outlook, by the way?

Outlook uses small fonts to render the response and there is a noticeable gap in readability between HTML formatted and plain text responses.