Xavier
2023-Feb-13 09:36 UTC
Could not override "mail_location" with "userdb_mail" statment in "/etc/passwd"
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>
Aki Tuomi
2023-Feb-13 09:48 UTC
Could not override "mail_location" with "userdb_mail" statment in "/etc/passwd"
> On 13/02/2023 11:36 EET Xavier <xavier-mlist at proton.me> wrote: > > > 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 ! > > /XavierHi! 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 Aki
Possibly Parallel Threads
- Userdb userdb_mail=, error Mailbox list driver maildir++: maildir_name not supported by this driver
- Userdb userdb_mail=, error Mailbox list driver maildir++: maildir_name not supported by this driver
- Userdb userdb_mail=, error Mailbox list driver maildir++: maildir_name not supported by this driver
- Variable %h not recognized in userdb_mail (passwd-file)
- sieve not respecting userdb_mail setting?