[Dovecot] LDA vs maildrop... LDA *and* maildrop?

email builder emailbuilder88 at yahoo.com
Fri Jun 22 11:24:27 EEST 2012

> We're considering a move from Courier to Dovecot.  So far, looks like

> it's not too bad, but the most challenging obstacle is what to do about
> our local delivery.  Factors:
> 1. we use a lot of maildrop "features" that are impossible in sieve 
> without piping to an external program (would rather not re-write our
> working maildrop scripts in another language)
> 2. would love to try dbox
> 3. we use IMAP/Maildir++ quotas (looks like with a little finesse
> it's possible to get maildrop and dovecot to play nice on this
> account, yes?)
> I saw it suggested to just call LDA from maildrop for any maildrop
> "to" commands (hmmm, what about "cc"?) here:
> http://article.gmane.org/gmane.mail.imap.dovecot/56120
> How much overhead will this take?  Would it be possible or
> advisable to use LMTP instead if that would help?  Is this
> idea just too crazy?

Oh, doing this would also have benefit of updating dovecot indexes
upon delivery, and we could ignore point 3 about the quotas and just
let dovecot handle deliver time quotas too right?  (remove quota
support from maildrop)

Also saw a suggestion to do it a little different:


So maildrop 

to "| foo"
to "! foo at bar.com"
cc "| foo"
cc "! foo at bar.com"

are left as is


to "<mailbox name>"

is replaced with either:

xfilter "/usr/lib/dovecot/dovecot-lda -m <mailbox name>"
to "| /dev/null"

or just:

to "| /usr/lib/dovecot/dovecot-lda -m <mailbox name>"


cc "<mailbox name>"

is replaced with either:

xfilter "/usr/lib/dovecot/dovecot-lda -m <mailbox name>"

or just:

cc "| /usr/lib/dovecot/dovecot-lda -m <mailbox name>"

and the default end-of-script (INBOX) delivery for maildrop (an
assumed "to 'INBOX'" command) can probably be replaced with
one or the other of:

xfilter "/usr/lib/dovecot/dovecot-lda"
to "| /dev/null"


to "| /usr/lib/dovecot/dovecot-lda"

Does any of this make sense?  I wonder how it will look to the
MTA (postfix here) when delivery fails.  It's also creating duplicate
user lookups for the two delivery agents which isn't great.

Maybe it'd be better to consider learning how to re-write our needed
maildrop scripts as shell scripts (maildrop is close enough to bash
I guess) and making sieve pipe out to them?

More information about the dovecot mailing list