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

Xavier xavier-mlist at proton.me
Mon Feb 13 09:36:39 UTC 2023


Hi,
** Using Dovecot 2.2.22 and Postfix 3.1.0 **

I plan to migrate all accounts on my server from mbox to maildir storage but before i want to make some tests on dedicated accounts. To do so i want to overide the general "mail_location" ( mail_location = mbox:~/mail:INBOX=/var/mail/%u ) with "maildir:~/Maildir" only for some test accounts.

To do so i modified my "/etc/passwd" file using something like that :

testm2m_mydomain.tld:x:2122:2122::/home/mail/testm2m_mydomain.tld:/bin/false:userdb_mail=maildir:~/Maildir
Also tried
testm2m_mydomain.tld:x:2122:2122::/home/mail/testm2m_mydomain.tld:/bin/false::userdb_mail=maildir:~/Maildir

And as mentioned in the doc (https://wiki.dovecot.org/LDA/Postfix) i added  -d "$USER" in my Postfix "mailbox_command" but it don't seem to work (my new mail_location for this test user is is not taken into account).

When i try to make an "doveadm user testm2m_mydomain.tld" i get this :

8<--------------------------------
field   value
uid     2122
gid     2122
home    /home/mail/testm2m_mydomain.tld
mail    mbox:~/mail:INBOX=/var/mail/testm2m_mydomain.tld
system_groups_user      testm2m_mydomain.tld
8<--------------------------------

My modification is not taken into account ...

Any help is welcome !

/Xavier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20230213/da5370cc/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publickey - xavier-mlist at proton.me - 0xC617DF73.asc
Type: application/pgp-keys
Size: 3150 bytes
Desc: not available
URL: <https://dovecot.org/pipermail/dovecot/attachments/20230213/da5370cc/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 855 bytes
Desc: OpenPGP digital signature
URL: <https://dovecot.org/pipermail/dovecot/attachments/20230213/da5370cc/attachment.sig>


More information about the dovecot mailing list