[Dovecot] LMTP with virtual and system users

Eugene genie at geniechka.ru
Sun Dec 29 20:31:07 EET 2013


Personally, I think it is more simple and convenient to migrate system 
users' mail to the virtual-user setup (i.e. two separate logins, e.g. 'user' 
for SSH and 'user at domain.com' for mail ).

Here are the relevant portions of my postfix config:

mydestination = localhost
local_recipient_maps =  $virtual_mailbox_maps  $virtual_alias_maps
mydomain = domain.com    # your 'local' host/domain name
myhostname = domain.com  # your 'local' host/domain name
smtpd_recipient_restrictions = ....., reject_unverified_recipient, .....  # 
to do LMTP-based verification of incoming mail
unknown_local_recipient_reject_code = 550
unverified_recipient_reject_code = 550
virtual_alias_maps = hash:/usr/ext/mail/valias
virtual_mailbox_domains = hash:/usr/ext/mail/vdomains
virtual_transport = lmtp:unix:private/dovecot-lmtp

/usr/ext/mail/valias defines additional redirections like
postmaster at domain.com         admin at domain.com
root at domain.com               admin at domain.com

/usr/ext/mail/vdomains is an access-map file with records for supported 
domains, like:
domain.com OK

Also adjust 'root' record in /etc/mail/aliases to point to qualified admin's 
mail address (admin at domain.com)

Best wishes

-----Original Message----- 
From: Philipp Kolmann
Sent: Wednesday, December 25, 2013 11:16 AM
To: Dovecot Mailing List
Subject: [Dovecot] LMTP with virtual and system users


I have a mailsystem where i have some local users with shell access and
full home dirs which receive mail and also several SQL virtual users
only for mail.
With the virtual users, everything works fine. Mail is delivered via
LMTP and also sieve works :)
The SQL Lookup knows what to do with username at domain.com

The problem is the system user. If exim delivers the mail to the lmtp
socket, the LMTPd can't find username at local.host
I would be able to specify the global auth_username_format=%n but then
my SQL queries break and I like the possibility to have xx at domain1.com
and xx at domain2.com routed to two different accounts.

As I have seen in the source, I can't specify username_format=%n in the
passdb {  driver = pam } backend. Do you have any suggestion how to
solve this issue?


More information about the dovecot mailing list