Random IMAP stuff

IMAP may be slow, but it has to deal with a very featureful spec. I consider hiding the backend implementation to be extremely important, as well as high-level folder, mail and MIME part operations.

Its main failings may be unavoidable without making the spec EVEN MORE complicated. Some parts of the implementation are painful with large mailboxes - for example, Mozilla Mail has to download some things like flag status (etc.) every time it starts up (maybe - I haven’t verified that it’s every time), for every mail. This would be intolerable on a dialup for me, as some folders have thousands of messages. Thankfully I either use Mozilla Mail on DSL, or access my mail via webmail.

Anyway, there’s no real alternative which satisfies the important criteria above.

Of course, I base my good feelings for IMAP on good client and server implementations. Mozilla Mail being the good client implementation - I haven’t found anything to beat it on the kinds of workload I use yet. And Critical Path Messaging Server as the good server implementation. Favourtism I know (disclaimer: I currently work for Critical Path), and I haven’t used very many commercial IMAP servers, but CPMS is so much better than any open source IMAP server.

I was actually quite surprised at how easily I was able to corrupt the Berkeley databases in Cyrus IMAP. Almost every time I quit the server using SIGINT, I had to run recovery on the databases. What was going on there? Seems like either there are no signal handlers in place for SIGINT, or they’re not doing the right thing and shutting down the database environment properly…

7 Responses to “Random IMAP stuff”

  1. Aidan Kehoe Says:

    I’m not that impressed with Mozilla mail, I have to say. Resource hungry (more so than the browser), lack of configurability, lack of transparency as to what it’s doing with newlines in text-only mails, crappy indentation of text from the previous mail … okay, VM (http://www.wonderworks.com/vm/)spoiled me. I must go write a IMAP backend for it. Any day now.

  2. Gary Coady Says:

    Resource hungry - okay it’s not the best perhaps. Similarly with configurability (this is where Thunderbird might improve on things over time). But I will say that I don’t really care about these, just so you know where I stand ;-)
    Newlines in text-only mails - well for that, I’m not sure what you mean. For text/plain (without flavour), it should just do what newlines do. Examples of bad behaviour please?

    For text/plain; format=flowed it should follow RFC 2646.

    For problematic indentation of text from the previous mail - are you talking about in the “reply to mail” screen. We all know that sucks - maybe I should try and push for some improvements…

  3. Gary Coady Says:

    And VM does support IMAP??

    (setq vm-imap-server-list
    ‘(
    “imap-ssl:mail.foocorp.com:993:inbox:login:becky:*”
    “imap:crickle.lex.ky.us:143:inbox:login:becky:*”
    )’
    )

    vm-visit-imap-folder

  4. Aidan Kehoe Says:

    In reverse order;

    Yes, VM supports IMAP. Only if you download the folder to the local disk, though, which kind of misses the point of the protocol. I may as well “ssh -fX mailserver gnuclient -f vm”. And actually, come to think of it, that’s a reasonably good idea. For that, though, the maildir support is also less than complete, and our mail server here uses that format. Multiple folders = good. IMAP = good. Multiple folders + IMAP = not doable with VM in this setup, sans horrific consistency issues.

    Problematic indentation of text from the previous mail; in XEmacs, I’m in the middle of a response that looks like this, because I’m inserting my text in the middle of a paragraph;

    > alouette gentille alouette, alouette je te
    > plumerai

    [my text here]

    je te plumerai la tete, je te plumerai la tete,
    > et la tete, et la tete, …

    I put my cursor at the second plumerai, press M-q, and it Just Works. Right paragraph width, whatever. Whereas in Mozilla, it’s type >, try to get the text to the wrap properly by hand, get slightly disoriented at what it does when I type enter in the quoted line. (It adds another newline so the quoted text is on a seperate, non >-marked line.) (Nothing else does this funky paragraph wrapping, I realise, so asking it of Mozilla is a bit much.)

    Example of bad behaviour; Umm, the indentation of text from previous mail would be part of it. A huge proportion of my mails (at least in my VM usage pattern) involve selective quoting, and the easier this is, the easier my life is. Also, all Windows apps do the following, but that doesn’t make it non-trasparent: type stuff into a text entry box in the browser, or into a wrapping mail in Mozilla until it wraps softly. Then go back to where it breaks with you cursor, and type enter. That enter you’ve just typed is now invisible, as would be a space in the same place.

    I hadn’t seen RFC 2646 before, and I have to say it looks pretty cool.

    Configurability; I want my citation dates in Irish, goddamn it! :-)
    Again, though, this isn’t something I expect to see possible outside VM (or perhaps Mutt), so I’m not necessarily criticising Mozilla for its lack.

    The resource hungriness; my laptop CPU runs at 2.2Ghz, it has 512MB RAM, I ordinarily don’t give a shit about the resource consumption of a single app. And now I consider it, it’s probably more what it does with the network that’s my issue; polling for new mail seems to have frozen the entire app a couple of times for me. (NB; I’m using a nightly (IIRC) hand compiled to use NetBSD’s native pthread implementation, which, though Done Right, is currently more or less beta, so atypical usage of the APIs is prone to crashing the app.)

  5. Aidan Kehoe Says:

    Anyway, why were you sigINTing Cyrus? Graceful exit is what TERM is for.

  6. Gary Coady Says:

    When I say SIGINT, I mean that I left it running in the foreground (for testing purposes), and pressed Control-C to stop it. I really do think this is a valid use case…

    Comments on the other bits later.

  7. Aidan Kehoe Says:

    Any opinion on http://www.bincimap.org/ , or have you tried it ever?

Leave a Reply