Re: [Dovecot] Permanent flags not announced and public mailbox with per-user index
On Mon, May 31 2010, Julien Danjou wrote: > My bad, Timo. It does work on some mailboxes actually. > > It seems I've some mailbox (even in the same directory) that are > different and where it does not work, but I don't know why yet. Answer is that I missed the `dovecot-shared' files in the directory where it did not worked. :) I've added this file where it was missing, and now I can say that the patch totally fix my issue: . select public.Stg-ee * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. * 12 EXISTS * 0 RECENT * OK [UNSEEN 2] First unseen. * OK [UIDVALIDITY 1254336597] UIDs valid * OK [UIDNEXT 13] Predicted next UID * OK [HIGHESTMODSEQ 1] Highest . OK [READ-WRITE] Select completed. Thanks a lot Timo ! Cheers, -- Julien Danjou // ᐰhttp://julien.danjou.info pgpojb9V1ufUf.pgp Description: PGP signature
Re: [Dovecot] Permanent flags not announced and public mailbox with per-user index
On Mon, May 31 2010, Timo Sirainen wrote: > Actually a side effect of that change is that it also changes > PERMANENTFLAGS. Dovecot's PERMANENTFLAGS handling is a bit stupid now I > guess. It either has all or nothing. My bad, Timo. It does work on some mailboxes actually. It seems I've some mailbox (even in the same directory) that are different and where it does not work, but I don't know why yet. -- Julien Danjou // ᐰhttp://julien.danjou.info pgpJLjCevltFT.pgp Description: PGP signature
Re: [Dovecot] Permanent flags not announced and public mailbox with per-user index
On Mon, May 31 2010, Timo Sirainen wrote: > Actually a side effect of that change is that it also changes > PERMANENTFLAGS. Dovecot's PERMANENTFLAGS handling is a bit stupid now I > guess. It either has all or nothing. I've tried the patch applying it on dovecot 1.2.11. Unfortunately, the mailbox is still announced the same way (READ-ONLY without the PERMANENTFLAGS). -- Julien Danjou // ᐰhttp://julien.danjou.info pgp3PpUzlU9Uf.pgp Description: PGP signature
Re: [Dovecot] Permanent flags not announced and public mailbox with per-user index
On Tue, May 25 2010, Timo Sirainen wrote: > On Thu, 2010-05-20 at 16:44 +0200, Julien Danjou wrote: > >> However, when selecting the mailbox, system flags are not announced as >> permanent but only as session flags: > > Yeah, that's a bug I guess.. > >> 3445 OK [READ-ONLY] Select completed. > .. >> Even if it's true that the Maildir is read-only, it's still possible to >> store \Seen permanently. > > I think the main bug is that maildir is thought to be read-only. IMAP > ACL RFC says READ-ONLY shouldn't be returned unless nothing can be > changed. Does this help? > http://hg.dovecot.org/dovecot-1.2/rev/c2c1639b91ee It will not help my mail client (Gnus). It does not care about the READ-ONLY status to store the \Seen flag for example, it cares about PERMANENTFLAGS. But it seems that is is its right. What do you think ? Cheers, -- Julien Danjou // ᐰhttp://julien.danjou.info pgpobkn5jQFQ7.pgp Description: PGP signature
[Dovecot] Permanent flags not announced and public mailbox with per-user index
Hi, I've a set of public mailboxes that all users can access. The index is stored per user, so each user can mark the message as read for themselves. This is with dovecot 1.2.10. However, when selecting the mailbox, system flags are not announced as permanent but only as session flags: 3619 SELECT "public.Admin" * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS ()] Read-only mailbox. * 324 EXISTS * 0 RECENT * OK [UNSEEN 171] First unseen. * OK [UIDVALIDITY 1254326934] UIDs valid * OK [UIDNEXT 1102] Predicted next UID * OK [HIGHESTMODSEQ 1] Highest 3445 OK [READ-ONLY] Select completed. I think (reading the RFC, but I bet you know it better than me) that FLAGS should also been set in PERMANENTFLAGS since they can be permanent. The relevant code seems to be in commands-util.c (dovecot 1.2.11): void client_send_mailbox_flags(struct client *client, bool selecting) { […] if (mailbox_is_readonly(client->mailbox)) { client_send_line(client, "* OK [PERMANENTFLAGS ()] " "Read-only mailbox."); } else { […] } } Even if it's true that the Maildir is read-only, it's still possible to store \Seen permanently. Am I getting things wrong, or is this a bug? If I'm correct, a simple fix MAY be not to send the PERMANENTFLAGS at all since the RFC says: OK [PERMANENTFLAGS ()] A list of message flags that the client can change permanently. If this is missing, the client should assume that all flags can be changed permanently. Thanks, -- Julien Danjou // ᐰhttp://julien.danjou.info pgp7NzQEMTaXq.pgp Description: PGP signature
Re: [Dovecot] Problem with LSUB and public namespace
At 1254487668 time_t, Timo Sirainen wrote: > On Oct 2, 2009, at 8:44 AM, Julien Danjou wrote: > > >. LSUB "" "%" > >* LSUB () "." "INBOX" > >. OK Lsub completed. > > > >LSUB does not return "public" as namespace :-( > > LSUB returns only subscribed mailboxes. Is anything subscribed under > public? dovecot -n output could also be useful. You may have missed it, but in my telnet example I did: . subscribe public.Admin . OK Subscribe completed. But anyway, I've a bunch of public.* subscribed, yes, I do confirm. dovecot -n follows: # 1.2.5: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-2-686 i686 Debian 5.0.2 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imaps ssl_cert_file: /etc/dovecot/imapd.pem ssl_key_file: /etc/dovecot/imapd.pem login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_privileged_group: mail mbox_write_locks: fcntl dotlock namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes namespace: type: public separator: . prefix: public. location: maildir:/home/Maildir-shared:CONTROL=~/Maildir/public:INDEX=~/Maildir/public list: yes subscriptions: yes auth default: passdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf userdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf socket: type: listen master: path: /var/run/dovecot/auth-master mode: 432 group: 1001 -- Julien Danjou // ᐰhttp://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD // Tomorrow I was nothing, yesterday I'll be. signature.asc Description: Digital signature
[Dovecot] Problem with LSUB and public namespace
Hi, I'd like to know if the following is normal. I've a setup with 2 namespace (private/public) where each user can use subscriptions. This problem is triggered by claws-mail, which uses LSUB to get subscribed mailboxes: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN] Dovecot ready. . login user password . namespace * NAMESPACE (("INBOX." ".")) NIL (("public." ".")) . OK Namespace completed. . subscribe public.Admin . OK Subscribe completed. . LSUB "" "%" * LSUB () "." "INBOX" . OK Lsub completed. LSUB does not return "public" as namespace :-( Is this a bug in dovecot, a bug in Claws mail, or a misconfiguration of my dovecot server? I can provide more info if needed. Cheers, -- Julien Danjou // ᐰhttp://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD // There is nothing under this line. signature.asc Description: Digital signature
Re: [Dovecot] Problem with 1.2 and sieve: failed with unsuccessful implicit keep
At 1247082407 time_t, Timo Sirainen wrote: > "let the bug"? The idea is anyway that you return > home=/var/mail/vmail/danjou.info/jd and set > > mail_location = maildir:%h > > That makes much more sense to me. I've considered making it an error to > return relative home dirs from userdb, but that might break some setups > that are actually working right.. Like mine. I don't think this is *bad* since it's, AFAIK, Dovecot only use in homedir to expand %h. Or do I miss another point? > Well, I guess there's some confusion about what a home dir is.. With > Dovecot the home dir is always what userdb returns as the home dir. > Dovecot doesn't care about /etc/passwd at all, unless your userdb is > passwd. So Dovecot doesn't know/care that deliver is run as "mail" user, > it doesn't care what /etc/passwd contains for the mail user. Okay, sorry for the confusion. I don't know why I though it was doing some chdir() in a part of mail_location, which has no sense. > > where as mail_location is /var/mail/vmail/%h. > > And almost all the mails (except the couples of ones I mentionned) are > > delivered and still delivered currently. > > It's probably the large mails that cause the problem. Dovecot writes > them to a temporary file under home directory. OK, that would explains everything actually, depending on what you call home directory. :-) If it's the user's home, it really has no sense since nowhere it returns something with /var/spool/postfix. Well, anyway, I changed my setup to return absolute path and it seems to work, the mails got delivered. I really suggest you[1] rather try to reproduce and fix the bug, or really disallow relative path in home directory since it's seems partly-broken, or maybe only for large file (your theory :). [1] Yeah, I know, it's easy to say... :-) Cheers, -- Julien Danjou // ᐰhttp://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD // I'm no superman. signature.asc Description: Digital signature
Re: [Dovecot] Problem with 1.2 and sieve: failed with unsuccessful implicit keep
At 1247080982 time_t, Timo Sirainen wrote: > > The thing is that danjou.info/jd/ is the homedir of the user (returned > > by SQL), > > Make your SQL query return absolute path for home dir. Sigh. That sounds like you let the bug. Quite sad to read. > > I smell (did not dig into the code) that there's a chdir() to > > mail_location that is missing for a reason I don't know. > > It's not supposed to chdir to mail_location. It's supposed to chdir to > home dir. Ok. Saw that in deliver.c. That's weird since it runs as 'mail', and mail's home is /var/mail, where as mail_location is /var/mail/vmail/%h. And almost all the mails (except the couples of ones I mentionned) are delivered and still delivered currently. Cheers, -- Julien Danjou // ᐰhttp://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD // When I get sad, I stop being sad and be awesome instead. True story. signature.asc Description: Digital signature
Re: [Dovecot] Problem with 1.2 and sieve: failed with unsuccessful implicit keep
At 1247075539 time_t, Timo Sirainen wrote: > http://hg.dovecot.org/dovecot-1.2/rev/6d7f6ea02e17 makes it log the > current directory in the above error message when the path is relative. Ok, that helps to see what's wrong, thanks: Jul 8 20:50:16 prometheus dovecot: deliver(j...@danjou.info): mkdir_parents_chown(danjou.info/jd/) in directory /var/spool/postfix failed: Permission denied (euid=8(mail) egid=8(mail)) Jul 8 20:50:16 prometheus dovecot: deliver(j...@danjou.info): copy: i_stream_read() failed: No such file or directory Of course, that fails. The thing is that danjou.info/jd/ is the homedir of the user (returned by SQL), and as you saw in my dovecot.conf, there's nothing like /var/spool/postfix for mail_location: mail_location = maildir:/var/mail/vmail/%h /var/spool/postfix is probably the directory where postfix starts dovecot, since it's the home for postfix user. I smell (did not dig into the code) that there's a chdir() to mail_location that is missing for a reason I don't know. (FWIW, I know have 4 mails in Postfix queue on 4 differents account stuck, whereas I still receive others mail without any problems (since I read you ;-). Cheers, -- Julien Danjou // ᐰhttp://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD // This is the end of my signature. signature.asc Description: Digital signature
[Dovecot] Problem with 1.2 and sieve: failed with unsuccessful implicit keep
Hi, First, thanks for this awesome piece of software. I've just upgraded to latest dovecot, aka 1.2. I've a problem. I've started using Sieve, and everything works fine, I already received a thousand of mails without any problem. However, there's one mail which is stuck in the postfix queue because of that: Jul 8 18:47:51 prometheus dovecot: deliver(j...@danjou.info): mkdir_parents_chown(danjou.info/jd/) failed: Permission denied (euid=8(mail) egid=8(mail)) Jul 8 18:47:51 prometheus dovecot: deliver(j...@danjou.info): copy: i_stream_read() failed: No such file or directory Jul 8 18:47:51 prometheus dovecot: deliver(j...@danjou.info): sieve: msgid=? <1186f9b5-0529-4622-8f4a-58462f9a4...@svr-exchange.siege.ldlc.com>: failed to store into mailbox 'INBOX': Internal error occurred. Refer to server log for more information. [2009-07-08 18:47:51] Jul 8 18:47:51 prometheus dovecot: deliver(j...@danjou.info): read(mail, uid=1) failed: Permission denied Jul 8 18:47:51 prometheus dovecot: deliver(j...@danjou.info): sieve: msgid=? <1186f9b5-0529-4622-8f4a-58462f9a4...@svr-exchange.siege.ldlc.com>: failed to store into mailbox 'INBOX': BUG: Unknown internal error Jul 8 18:47:51 prometheus dovecot: deliver(j...@danjou.info): sieve: script /var/mail/sieve/j...@danjou.info.dovecot.sieve failed with unsuccessful implicit keep IMHO, the bug is around the uid stuff. the read(mail, uid=1) seems very wrong. since this uid is not used at all in the configuration file. I can provide more information if needed, just ask. dovecot 1.2 Debian GNU/Linux 5.0 (lenny) CPU amd64 FS is ext3 # dovecot -n # 2007 pts/0 19:27:38 # 1.2.0: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-1-amd64 x86_64 Debian 5.0.2 ext3 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imaps pop3s managesieve ssl_cert_file: /etc/ssl/private/ssl.naquadah.org.crt ssl_key_file: /etc/ssl/private/ssl.naquadah.org.key login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login first_valid_uid: 8 last_valid_uid: 8 mail_privileged_group: mail mail_location: maildir:/var/mail/vmail/%h mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve auth default: user: mail passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: prefetch userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: mail group: mail plugin: sieve: /var/mail/sieve/%u.dovecot.sieve Anonymized mail attached. The From line was manually added, mainly because I extracted the content from the Postfix queue. (I'm not subscribed.) Cheers, -- Julien Danjou // ᐰhttp://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD // Life is life. Lalalalala. signature.asc Description: Digital signature