Could not override "mail_location" with "userdb_mail" statment in "/etc/passwd"

Aki Tuomi aki.tuomi at open-xchange.com
Tue Feb 14 07:50:14 UTC 2023


> On 14/02/2023 09:47 EET Xavier <xavier-mlist at proton.me> wrote:
> 
>  
> > You need to use passwd-file driver. I would recommend adding secondary userdb for overrides in a separate file instead of modifying /etc/passwd.
> >
> > userdb {
> > driver = passwd
> > result_success = continue-ok
> > }
> >
> > userdb {
> > driver = passwd-file
> > args = /etc/dovecot/overrides
> > }
> >
> > and put in overrides
> >
> > testm2m_mydomain.tld:::::::userdb_mail=maildir:~/Maildir
> 
> Hi Aki,
> 
> Thanks for your answer !
> 
> I've just gived a try and it works partially :
> 
> - the "userdb_mail=maildir:~/Maildir" is well taken into account for my user in "/etc/dovecot/overrides" (testm2m_mydomain.tld)
> 
> BUT
> 
> - all other accounts (located in "/etc/passwd" and not in "/etc/dovecot/overrides") could not connect anymore to the Dovecot server (POP/IMAP...). I got this kind of message in mail mail.log :
> 
> 8<------------------------------
> Feb 13 21:58:14 mail dovecot: imap: Error: Authenticated user not found from userdb, auth lookup id=2769158145 (client-pid=27095 client-id=1)
> Feb 13 21:58:14 mail dovecot: imap-login: Internal login failure (pid=27095 id=1) (internal failure, 1 successful auths): user=<xavier_mydomain.tld>, method=PLAIN, rip=x.x.x.x, lip=y.y.y.y, mpid=27096, secured, session=<N2VZZ4v0oNABJ3LB>
> 8<------------------------------
> 
> Any idea ?
> 
> Thanks for your help !
> 
> /Xavier

Try adding both

skip=notfound

and

result_failure = continue-ok

to ignore the not found error, to the override db.

Aki


More information about the dovecot mailing list