LDA doing passdb queries ?

Peter Mogensen apm at one.com
Mon Aug 22 13:47:03 UTC 2016


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


More information about the dovecot mailing list