Ladislav Laska
2016-Dec-10 18:11 UTC
mail_location in userdb inconsistent with imap and pigeonhole
Hi! I'm still fighting with lost mails and what I think is a locking problem. As I've lost some pretty important mails already, I decided to mitigate my troubles by moving to maildir format, which should not be susceptible to these problems. I read the docs and wanted to test on my account, before I mess with all the others and possibly break something. The way to do it seems to be to do an override via userdb. I already have a passwd-file authdb, so I uncommented those few lines in configuration, and added this to my passwd-file: krakonos:{SHA256}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=:1000:100::/home/krakonos:/bin/bash:userdb_mail=maildir:/home/krakonos/Mail Now, I'm not really sure why it has to be prefixed with userdb_, but the example in docs has it, and it seems to work. I've attached the relevant part of a logfile, with some debugging enabled, but in short: Dec 10 18:39:22 ibex dovecot: imap(krakonos): Debug: Added userdb setting: mail=maildir:/home/krakonos/Mail [...] Dec 10 18:39:22 ibex dovecot: imap(krakonos): Debug: maildir++: root=/home/krakonos/Mail, index=, indexpvt=, control=, inbox=/home/krakonos/Mail, alt[...] Dec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: mbox: INBOX defaulted to /home/krakonos/.mbox/inbox I'm confused why the last line chooses my old mbox over the new location. I'm even more confused by the fact the IMAP works fine, and as I connect from mutt over imap, I can see empty mailboxes (the ~/Mail has only the basic cur/new/tmp structure). However, pigeonhole delivers into the .mbox, and not only if it's for INBOX, but also for spam and others. I read somewhere in the docs that the order is first try userdb, then mail_location and namespaces override the rest. This might be the problem, as I have: mail_location = mbox:~/.mbox 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 = } Due to inbox=yes this would explain why inbox is using the default path in mail_location. But why even the spam is delivered into the old mbox? And how do I solve the problem anyway, should I just remove the namespace? Anyway, it doesn't explain why the IMAP part and pigeonhole apply different rules and show me different inboxes, which is probably a bug. Thanks! ----------------------------------------------------------------------- Here is the rest of my configuration for reference, the log is attached: ----------------------------------------------------------------------- # 2.2.26.0 (23d1de6): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.16 (fed8554) # OS: Linux 4.4.26-gentoo x86_64 Gentoo Base System release 2.2 auth_username_format = %n hostname = ibex.krakonos.org login_greeting = Dovecot at krakonos.org ready. mail_debug = yes mail_location = mbox:~/.mbox mbox_read_locks = dotlock fcntl 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 { args = * driver = pam } passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/users driver = passwd-file } plugin { sieve = file:~/sieve;active=~/.dovecot.sieve sieve_execute_bin_dir = /usr/lib/dovecot/sieve-execute sieve_execute_socket_dir = sieve-execute sieve_extensions = +vnd.dovecot.filter +editheader sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter sieve_filter_socket_dir = sieve-filter sieve_pipe_bin_dir = /usr/lib/dovecot/sieve-pipe sieve_pipe_socket_dir = sieve-pipe sieve_plugins = sieve_extprograms } postmaster_address = postmaster at krakonos.org protocols = imap service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } } ssl_cert = </etc/ssl/dovecot/server.pem ssl_key = # hidden, use -P to show it userdb { driver = passwd } userdb { args = username_format=%u /etc/dovecot/users driver = passwd-file } protocol lda { mail_plugins = sieve } -- S pozdravem Ladislav "Krakono?" L?ska http://www.krakonos.org/
Ladislav Laska
2016-Dec-10 18:37 UTC
mail_location in userdb inconsistent with imap and pigeonhole
And as always, I didn't attach the file. Here it is. -- S pozdravem Ladislav "Krakono?" L?ska http://www.krakonos.org/ -------------- next part -------------- Dec 10 18:39:15 ibex dovecot: master: Dovecot v2.2.26.0 (23d1de6) starting up for imap Dec 10 18:39:22 ibex dovecot: imap-login: Login: user=<krakonos>, method=PLAIN, rip=77.48.73.189, lip=78.108.107.19, mpid=906, TLS, session=<Q5yuWVFDrN BNMEm9> Dec 10 18:39:22 ibex dovecot: imap(krakonos): Debug: Added userdb setting: mail=maildir:/home/krakonos/Mail Dec 10 18:39:22 ibex dovecot: imap(krakonos): Debug: Effective uid=1000, gid=100, home=/home/krakonos Dec 10 18:39:22 ibex dovecot: imap(krakonos): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes lo cation=maildir:/home/krakonos/Mail Dec 10 18:39:22 ibex dovecot: imap(krakonos): Debug: maildir++: root=/home/krakonos/Mail, index=, indexpvt=, control=, inbox=/home/krakonos/Mail, altDec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: Loading modules from directory: /usr/lib64/dovecot Dec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: Module loaded: /usr/lib64/dovecot/lib90_sieve_plugin.so Dec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: Effective uid=1000, gid=100, home=/home/krakonos Dec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes loc ation=mbox:~/.mbox Dec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: mbox: INBOX defaulted to /home/krakonos/.mbox/inbox Dec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: fs: root=/home/krakonos/.mbox, index=, indexpvt=, control=, inbox=/home/krakonos/.mbox/inbox, altDec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: userdb lookup skipped, username taken from USER environment Dec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt=
Stephan Bosch
2017-Jan-31 20:40 UTC
mail_location in userdb inconsistent with imap and pigeonhole
Op 12/10/2016 om 7:11 PM schreef Ladislav Laska:> Hi! > > I'm still fighting with lost mails and what I think is a locking > problem. > > As I've lost some pretty important mails already, I decided to mitigate > my troubles by moving to maildir format, which should not be susceptible > to these problems. > > I read the docs and wanted to test on my account, before I mess with all > the others and possibly break something. The way to do it seems to be to > do an override via userdb. I already have a passwd-file authdb, so I > uncommented those few lines in configuration, and added this to > my passwd-file: > > krakonos:{SHA256}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=:1000:100::/home/krakonos:/bin/bash:userdb_mail=maildir:/home/krakonos/Mail > > Now, I'm not really sure why it has to be prefixed with userdb_, but the > example in docs has it, and it seems to work. > > I've attached the relevant part of a logfile, with some debugging > enabled, but in short: > > Dec 10 18:39:22 ibex dovecot: imap(krakonos): Debug: Added userdb > setting: mail=maildir:/home/krakonos/Mail > [...] > Dec 10 18:39:22 ibex dovecot: imap(krakonos): Debug: maildir++: > root=/home/krakonos/Mail, index=, indexpvt=, control=, > inbox=/home/krakonos/Mail, alt> [...] > Dec 10 18:39:52 ibex dovecot: lda(krakonos): Debug: mbox: INBOX > defaulted to /home/krakonos/.mbox/inbox > > > I'm confused why the last line chooses my old mbox over the new > location.LDA does not perform a userdb lookup by default. That is probably what is going on here: http://wiki2.dovecot.org/LDA#Virtual_users Regards, Stephan.