LMTP with many aliases and replication

Sean Greenslade sean at seangreenslade.com
Wed Nov 7 07:08:46 EET 2018


Hi, all. I'm currently in the process of rethinking / tinkering with my
personal mail server. I've hit a few stumbling blocks that make me
think I may be approaching this problem from the wrong angle.

I have a large number of email addresses across several domains that all
alias to the same inbox. In my current setup, postfix handles the
aliases and dumps them all into a single "receiving" maildir, which gets
processed by a custom python script to sort into one of several
destination maildirs handled by dovecot. In evaluating this system, I'd
like to move to using sieve for this sorting step, so (according to the
docs) I need to use LMTP.

This is my first stumble. Since I use so many aliases, my IMAP login
username is not my email address. In fact, I have several IMAP
usernames with different passwords pointing to the same maildir so that
my phone can use a different password than my PC. The dovecot
documentation was not very clear on how to make LMTP use a different
userdb. I eventually found through some trial and error and some hints
from other list threads that I could wrap a second userdb {} section
with a protocol lmtp {} section, which seems to do the trick. I'd like
to edit the wiki to include this helpful tidbit, but I find it odd that
this isn't mentioned anywhere in the documentation for LMTP. Is it
actually an intended feature?

My second stumble is with the replicator plugin. I'd like to run two
identical dovecot servers that replicate their mailboxes across each
other. Since there are a large number of alias "accounts" that all feed
into one IMAP account, the logical place to put the replication would be
the IMAP account. But the way the replicator plugin seems to work, the
trigger for synchronous replication on mail receipt fires on the LMTP
"account" that received that particular message. Is there any way within
dovecot to specify a different replication account to be triggered for
sync? Like a userdb extra field or something? I'm trying to avoid
needing external scripts if at all possible.

I'm interested to hear people's thought / suggestions, especially if
anyone has a better way of architecting this system. In case it's
relevant, I'm running Arch Linux / Dovecot 2.3.3.

Thanks,

--Sean


More information about the dovecot mailing list