Hello,

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 'u...@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
postmas...@domain.com         ad...@domain.com
r...@domain.com               ad...@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 (ad...@domain.com)

Best wishes
Eugene

-----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

Hi,

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 usern...@domain.com

The problem is the system user. If exim delivers the mail to the lmtp
socket, the LMTPd can't find usern...@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 x...@domain1.com
and x...@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?

thanks
Philipp


Reply via email to