A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=632
======================================================================
Reported By: naf
Assigned To:
======================================================================
Project: DBMail
Issue ID: 632
Category: Sieve (delivery, dbmail-sievecmd, dbmail-timsieved)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 23-Jul-07 11:14 CEST
Last Modified: 08-Aug-07 00:51 CEST
======================================================================
Summary: Not work imapFlags whith libsieve-2.2.5
Description:
Bug in code sortsieve.c
Wrong name "imapflags", line 231 in "sieve2_getvalue_stringlist(s,
"imapflags");",
not detected ":flags" action in sieve script. Correct name "flags"
(http://libsieve.sourceforge.net/example.php).
Erorr in loop "// Find the ones we support." line 244, wrong array range,
and wrong index "i" in msgflags[i], line 246.
======================================================================
----------------------------------------------------------------------
naf - 23-Jul-07 11:18
----------------------------------------------------------------------
--- dbmail-2.2.5/modules/sortsieve.c 2007-06-02 16:14:40.000000000 +0300
+++ dbmail-flagfix/modules/sortsieve.c 2007-07-23 10:53:26.000000000
+0300
@@ -228,7 +228,7 @@
int *msgflags = NULL;
mailbox = sieve2_getvalue_string(s, "mailbox");
- flags = sieve2_getvalue_stringlist(s, "imapflags");
+ flags = sieve2_getvalue_stringlist(s, "flags");
/* This condition exists for the KEEP callback. */
if (! mailbox) {
@@ -241,9 +241,9 @@
msgflags = g_new0(int, IMAP_NFLAGS);
for (i = 0; flags[i]; i++) { // Loop through all
script/user-specified
flags.
- for (j = 0; imap_flag_desc[j]; j++) { // Find the ones
we support.
+ for (j = 0; j < IMAP_NFLAGS; j++) { // Find the ones we
support.
if (g_strcasestr(imap_flag_desc[j], flags[i])) {
- msgflags[i] = 1;
+ msgflags[j] = 1;
}
}
}
----------------------------------------------------------------------
aaron - 08-Aug-07 00:51
----------------------------------------------------------------------
Thanks for your patch! I have this in my tree and will prepare some more
thorough unit tests then check it in for DBMail 2.2.6.
Issue History
Date Modified Username Field Change
======================================================================
23-Jul-07 11:14 naf New Issue
23-Jul-07 11:14 naf File Added: sortsieve_flagfix.patch
23-Jul-07 11:18 naf Note Added: 0002310
08-Aug-07 00:51 aaron Note Added: 0002319
======================================================================
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev