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 publickey - xavier-mlist@proton.me - 0xC617DF73.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Error: Corrupted index cache file
12.02.2023 21:36, Alessio Cecchi пишет: I've run into this error in the past in some situations: - one was during the migration from Centos 6 to 7, probably the NFS client in the kernel had some differences in cache management - one was with Ubuntu and NFS server in Google Cloud, I don't remember exactly how I solved it in that case but the problem was the NFS server (maybe because the NFS server only supported version 4.1 and there were locking issues) - one was where I used Director but local delivery via LDA, I solved it by switching to delivery via LMTP What NFS server/storage are you using? And with what NFS version your Maildir are mounted? We use NFS on Ubuntu nfs-kernel-server 1:1.3.4-2.1ubuntu5.5 nfs-common 1:1.3.4-2.1ubuntu5.5 $ nfsstat | grep nfs Server nfs v4: Now Maildir mounted with these options: type nfs4 (rw,noatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800,hard,nordirplus,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=IP-address,local_lock=none,addr=ip-address) Are you using LDA or LMTP for delivery? Uses LMTP for delivery. After what change did the problem start? It seems that problem exists a long time. -- Best wishes Sohin Vyacheslav
Re: Could not override "mail_location" with "userdb_mail" statment in "/etc/passwd"
> On 13/02/2023 11:36 EET Xavier 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 ! > > /Xavier Hi! 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
IMAP folder subscription on Apple/Mac Mail
Hi, We have a user with an iPhone who can't see their maildir mailboxes on dovecot-2.3.20 on fedora37. I've created a "subscriptions" file with all maildir mailboxes with the proper format (converted from mboxes using mb2md), but the user can only see their inbox. It appears this may be a known problem? https://wiki.dovecot.org/Clients Perhaps it's a problem with my "subscriptions" file, despite being able to see all mailboxes using K-9 on my android? Ideas for troubleshooting would be greatly appreciated.
Re: IMAP folder subscription on Apple/Mac Mail
Hi, I thought it might help to also have my config info. # 2.3.20 (80a5ac675d): /etc/dovecot/dovecot.conf # OS: Linux 6.1.10-200.fc37.x86_64 x86_64 Fedora release 37 (Thirty Seven) xfs # Hostname: cipher.guardiandigital.com auth_mechanisms = plain login default_process_limit = 4000 default_vsz_limit = 1 G disable_plaintext_auth = no lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes listen = 209.XXX.94.60, 127.0.0.1 mail_debug = yes mail_gid = users mail_location = maildir:/home/%u/Maildir mail_privileged_group = mail namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } service anvil { client_limit = 12003 } service auth-worker { client_limit = 2 } service auth { client_limit = 2 unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } service imap-login { inet_listener imaps { port = 993 ssl = yes } process_min_avail = 20 service_count = 0 vsz_limit = 1 G } ssl_ca = wrote: > Hi, > We have a user with an iPhone who can't see their maildir mailboxes on > dovecot-2.3.20 on fedora37. I've created a "subscriptions" file with all > maildir mailboxes with the proper format (converted from mboxes using > mb2md), but the user can only see their inbox. > > It appears this may be a known problem? > https://wiki.dovecot.org/Clients > > Perhaps it's a problem with my "subscriptions" file, despite being able to > see all mailboxes using K-9 on my android? > > Ideas for troubleshooting would be greatly appreciated. > > >
Re: Could not override "mail_location" with "userdb_mail" statment in "/etc/passwd"
> 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=, method=PLAIN, rip=x.x.x.x, lip=y.y.y.y, mpid=27096, secured, session= 8<-- Any idea ? Thanks for your help ! /Xavier publickey - xavier-mlist@proton.me - 0xC617DF73.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Could not override "mail_location" with "userdb_mail" statment in "/etc/passwd"
> On 14/02/2023 09:47 EET Xavier 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=, > method=PLAIN, rip=x.x.x.x, lip=y.y.y.y, mpid=27096, secured, > session= > 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