[Dovecot] Moving new email from the mail spool to the inbox

Chris Wakelin c.d.wakelin at reading.ac.uk
Fri May 4 19:59:51 EEST 2007

I guess you're delivering mail to /var/mail/username, and UW-IMAP
"snarfs" (to use the UW term :))  the messages to ~/mbox (if it exists)
whenever the user opens INBOX in IMAP.

If so, I guess the problem is the Unix file-system clients which expect
to see mail in /var/mail/username? Dovecot can do both IMAP and POP very
well, (and you can specify the mail location for each user independently
if you have to).

You could configure Exim to deliver directly to the user's ~/mbox if,
say, /var/mail/username is empty and ~/mbox exists, and assume that
file-system clients will never have a ~/mbox or let /var/mail/username
be empty. A bit yucky though!

It might also be possible to write a Dovecot plugin to emulate the
UW-IMAP "snarf" behaviour, but as far as I know, nobody has.

We never used the "snarf" behaviour ourselves (except accidentally, when
the new version of UW-IMAP I'd compiled had it built in by default,
unnoticed by me, and a few ancient users had ~/mbox files ...)

I have to say that our UW-IMAP -> Dovecot transition was painless
(transparent!) and that the performance gains were huge (otherwise we'd
still be "pruning" user's INBOXes into folders for them every few months).

Best Wishes,

Adrian Barker wrote:
> Thanks for replying. We cannot easily change the way we deliver email,
> as we have over 30,000 users, who use a mixture of imap, pop and Unix
> email clients, so we have to continue to deliver email to a central mail
> spool. The MTA that we run is Exim, which has the flexibility to deliver
> into the 'Inbox', but we need to remain compatible with non-IMAP mailers.
> Adrian Barker,
> University College London.
> Andy Shellam wrote:
>> Hi Adrian,
>> I'm thinking this is more of an issue with your MTA, as usually that's
>> responsible for delivering into the mailbox's Inbox.
>> You might want to look at Dovecot's LDA, "deliver"
>> (http://wiki.dovecot.org/LDA).
>> Deliver takes an e-mail piped from your MTA, with appropriate options on
>> the command-line, and delivers it into the relevant mailbox correctly.
>> Regards,
>> Andy.
>> Adrian Barker wrote:
>>> We are considering switching from the Washington UW IMAP server to
>>> Dovecot for performance reasons, but we make use of the feature in the
>>> UW server that automatically moves new email from the mail spool to the
>>> IMAP INBOX. Has anyone implemented this in Dovecot, or considered
>>> implementing it ? We have a large number of users, so cannot easily
>>> change the way that we deliver email.

Christopher Wakelin,                           c.d.wakelin at reading.ac.uk
IT Services Centre, The University of Reading,  Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK              Fax: +44 (0)118 975 3094

More information about the dovecot mailing list