LMTP and public mailboxes?

Eric Abrahamsen eric at ericabrahamsen.net
Wed Feb 20 22:54:23 EET 2019


I've been using postfix and dovecot for a few years, and have been doing
public mailboxes with dovecot-lda, using a postfix transport that looks
like (line wrapped for the mailer):

my-public-transport unix - n n - - pipe
  flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -u <me> -e \
  /usr/lib/dovecot/dovecot-lda -f ${sender} -d <me> -m public/${user}

So messages first passed to spamassassin, using my own personal config
for bayes rules, then to dovecot-lda, using my user for auth, and
finally delivering to a public/* mailbox, with acl rules for access.

I'm moving spamassassin to a mimedefang milter, so that's out of the
equation; and LDA to LMTP, so the postfix config simply becomes:

virtual_transport = lmtp:unix:private/dovecot-lmtp

That's much nicer, but I'm not sure how to handle the public mailbox
using LMTP.

How are people doing this? While Googling I saw a recommendation to
create a virtual user for the public mailboxes, and then presumably
Postfix would map "info at mydomain.com" to "publicuser+info at mydomain.com"
and I would go from there. But that seems a little weird: I don't want
anyone to be able to log in as publicuser, nor to send mail as that user
(Postfix uses Dovecot for auth). Yet I don't seem to be able to pass
other arguments to lmtp, that might indicate which user to use for auth.

Does anyone have a clean solution for this?

Thanks in advance,

More information about the dovecot mailing list