"NOTIFY SET (mailboxes INBOX (...))" crashes the IMAP client
Hi list,
The NOTIFY extension (RFC 5465) works fine for mailboxes in the "virtual/" namespace, but it crashes the IMAP client when used with a mailbox in the empty "" namespace:
~$ /usr/lib/dovecot/imap
* PREAUTH [CAPABILITY IMAP4rev1 … NOTIFY SPECIAL-USE] Logged in as guilhem
a NAMESPACE
* NAMESPACE (("" "/")("virtual/" "/")) NIL NIL
a OK Namespace completed.
b NOTIFY SET (mailboxes virtual/all (MessageNew MessageExpunge))
b OK NOTIFY completed (0.001 secs).
c NOTIFY SET (mailboxes INBOX (MessageNew MessageExpunge))
imap(guilhem): Panic: file mail-namespace.c: line 679 (mail_namespace_find): assertion failed: (ns != NULL)
imap(guilhem): Error: Raw backtrace: …
Aborted
The "subtree" mailbox filter has the same problem, but the non-parameterized ones ("inboxes", "personal" and "subscribed") work fine.
You'll find the output of ‘dovecot -n’ enclosed. Cheers,
Guilhem.
On Sun, 19 Jul 2015 at 19:21:16 +0200, Guilhem Moulin wrote:
The "subtree" mailbox filter has the same problem, but the non-parameterized ones ("inboxes", "personal" and "subscribed") work fine.
Actually there are further problem with the INBOX namespace, to which I'm subscribed:
$ /usr/lib/dovecot/imap
S1: * PREAUTH [CAPABILITY IMAP4rev1 … MOVE NOTIFY SPECIAL-USE] Logged in as guilhem
C1: a1 LIST "" (INBOX TRASH) RETURN (SUBSCRIBED)
S1 * LIST (\Subscribed \UnMarked) "/" TRASH
S1 * LIST (\Subscribed) "/" INBOX
S1: a1 OK List completed (0.003 secs).
C1: b1 NOTIFY SET (SUBSCRIBED (MessageNew MessageExpunge FlagChange))
S1: b1 OK NOTIFY completed (0.002 secs).
$ /usr/lib/dovecot/imap
S2: * PREAUTH [CAPABILITY IMAP4rev1 … MOVE NOTIFY SPECIAL-USE] Logged in as guilhem
C2: a2 APPEND INBOX {1+}
C2: x
S2: a2 OK [APPENDUID 1384472528 26087] Append completed (0.008 secs).
This crashes S1 as well:
S1: imap(guilhem): Panic: file mail-storage.c: line 1511 (mailbox_is_subscribed): assertion failed: (box->list->subscriptions != NULL)
S1: imap(guilhem): Error: Raw backtrace: […]
S1: Aborted
This might be related to [0] as it is INBOX-specific as well: APPENDing a message to TRASH (to which I'm also subscribed) triggers the MessageNew notification as expected.
S1: * STATUS TRASH (MESSAGES 3407 UIDNEXT 113820 UNSEEN 1)
-- Guilhem.
[0] http://dovecot.org/pipermail/dovecot/2015-July/101514.html
On 07/26/2015 07:00 PM, Guilhem Moulin wrote:
On Sun, 19 Jul 2015 at 19:21:16 +0200, Guilhem Moulin wrote:
The "subtree" mailbox filter has the same problem, but the non-parameterized ones ("inboxes", "personal" and "subscribed") work fine.
Actually there are further problem with the INBOX namespace, to which I'm subscribed:
$ /usr/lib/dovecot/imap S1: * PREAUTH [CAPABILITY IMAP4rev1 … MOVE NOTIFY SPECIAL-USE] Logged in as guilhem C1: a1 LIST "" (INBOX TRASH) RETURN (SUBSCRIBED) S1 * LIST (\Subscribed \UnMarked) "/" TRASH S1 * LIST (\Subscribed) "/" INBOX S1: a1 OK List completed (0.003 secs). C1: b1 NOTIFY SET (SUBSCRIBED (MessageNew MessageExpunge FlagChange)) S1: b1 OK NOTIFY completed (0.002 secs). $ /usr/lib/dovecot/imap S2: * PREAUTH [CAPABILITY IMAP4rev1 … MOVE NOTIFY SPECIAL-USE] Logged in as guilhem C2: a2 APPEND INBOX {1+} C2: x S2: a2 OK [APPENDUID 1384472528 26087] Append completed (0.008 secs).
This crashes S1 as well:
S1: imap(guilhem): Panic: file mail-storage.c: line 1511 (mailbox_is_subscribed): assertion failed: (box->list->subscriptions != NULL)
On 07/19/2015 08:21 PM, Guilhem Moulin wrote:
Hi list,
The NOTIFY extension (RFC 5465) works fine for mailboxes in the "virtual/" namespace, but it crashes the IMAP client when used with a mailbox in the empty "" namespace:
Fixed: http://hg.dovecot.org/dovecot-2.2/rev/fae5feef70af
~$ /usr/lib/dovecot/imap * PREAUTH [CAPABILITY IMAP4rev1 … NOTIFY SPECIAL-USE] Logged in as guilhem a NAMESPACE * NAMESPACE (("" "/")("virtual/" "/")) NIL NIL a OK Namespace completed. b NOTIFY SET (mailboxes virtual/all (MessageNew MessageExpunge)) b OK NOTIFY completed (0.001 secs). c NOTIFY SET (mailboxes INBOX (MessageNew MessageExpunge)) imap(guilhem): Panic: file mail-namespace.c: line 679 (mail_namespace_find): assertion failed: (ns != NULL) imap(guilhem): Error: Raw backtrace: … Aborted
The "subtree" mailbox filter has the same problem, but the non-parameterized ones ("inboxes", "personal" and "subscribed") work fine.
You'll find the output of ‘dovecot -n’ enclosed. Cheers,
participants (2)
-
Guilhem Moulin
-
Timo Sirainen