Hi, I can see dovecot is doing a passdb query when handling the LMTP RCPT command. That's kinda unexpected for me. I would have thought it only did a userdb lookup. I have disabled lmtp_proxy to be sure it didn't do a passdb lookup to check the proxy field. Is this expected? Doesn't the LDA only do userdb lookups? /Peter
Sorry... I meant LDA - not LMTP. More specifically ... the delivery happening during an LMTP session. I'm trying something like this: ==================================================================protocol !lda { passdb { driver = passwd-file args = /etc/dovecot/accounts } userdb { driver = static args = uid=vmail gid=vmail home=/srv/vmail/%u mail=maildir:~ } } protocol lda { # passdb { # driver = static # } userdb { args = /etc/dovecot/dovecot-dict-auth.conf.ext driver = dict result_success = continue-ok result_failure = return-fail } userdb { driver = static args = uid=vmail gid=vmail home=/srv/vmail/%u mail=maildir:~ } } ================================================================= The point being that delivery is done to an address which needs an external userdb to rewrite the "user" value. All other access (IMAP...) uses the defined accounts. The above config won't do, since dovecot complains about a missing passdb database (and that PLAIN needs one) ... even if there's no actual authentication done during delivery. It doesn't seem to work, since trying to do delivery via LMTP still consults /etc/dovecot/accounts /Peter
On 2016-08-22 13:21, Peter Mogensen wrote:> ==================================================================.... > protocol lda { > # passdb { > # driver = static > # } > > userdb { > args = /etc/dovecot/dovecot-dict-auth.conf.ext > driver = dict > result_success = continue-ok > result_failure = return-fail > } > userdb { > driver = static > args = uid=vmail gid=vmail home=/srv/vmail/%u mail=maildir:~ > } > } > =================================================================I realized that the passdb is needed when using the static driver to find out which users actually exist. And that you have to use args=allow_all_users=yes. But it seems the logic to detect that a passdb is needed doesn't discover that I have a dict userdb before the static one ?!?! Anyway ... I think I got what I wanted by not trying to change the user in a userdb, but doing it in a passdb: =====================================================================protocol !lmtp { passdb { driver = passwd-file args = /etc/dovecot/accounts } } protocol lmtp { passdb { args = /etc/dovecot/dovecot-dict-auth.conf.ext driver = dict } } userdb { driver = static args = uid=vmail gid=vmail home=/srv/imip/vmail mail=maildir:~ } ===================================================================== Where the dict passdb returns something like: O{"nopassword":"yes", "user": "static-user"} This leaves me with 1 question though: Shouldn't you be able to do this with a userdb rewriting "user" on delivery (LMTP RCPT) and no passdb? /Peter
Reasonably Related Threads
- dovecot passdb driver=checkpassword as external script for block ip
- Different passdb backends for different services
- Different passdb backends for different services
- [SOLVED] Re: LMTP Post login script for acl_groups
- iterate users with passwd-file passdb?