[Tickets #2486] NEW: Wrong Sieve Script Generation

bugs@bugs.horde.org bugs at bugs.horde.org
Sun Aug 21 15:11:54 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=2486
-----------------------------------------------------------------------
 Ticket             | 2486
 Created By         | abc at digithi.de
 Summary            | Wrong Sieve Script Generation
 Queue              | Ingo
 Version            | 1.0.1
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


abc at digithi.de (2005-08-21 15:11) wrote:

Ingo tests all rules for "From" or  "To", "Cc", "Bcc" to get the right
information if the generated rule is applied for "header" or address"
fields. If you generate a user-defined rule with for example
"X-Apparently-To" ingo intreprets this as a "address" field (because it
finds a "To"). This is wrong, it is a header field. If that wrong script is
transferred to the sieve daemon it produces an error because of the
malformed rule. The patch corrects the behaviour, it tests not only for a
"To" in the whole header line, it checks that To is the first word in line.

--- sieve.php.orig      Tue Aug 17 07:11:58 2004
+++ sieve.php   Mon Aug 22 00:03:05 2005
@@ -532,7 +532,7 @@

                     /* Do 'smarter' searching for fields where we know we
                        have e-mail addresses. */
-                    if (preg_match('/(From|To|Cc|Bcc)/',
$condition['field'])) {
+                    if (preg_match('/^(From|To|Cc|Bcc)/',
$condition['field'])) {
                         $vals['addresses'] = preg_replace('/(?<!\\\)\,/',
"\n", $condition['value']);
                         $use_address_test = true;
                     } else {





More information about the bugs mailing list