[#8804] Procmail script generation error
Summary Procmail script generation error
Queue Ingo
Queue Version 1.2.3
Type Bug
State Resolved
Priority 1. Low
Owners Jan Schneider <jan (at) horde (dot) org>
Requester rene (dot) plattner (at) uibk (dot) ac (dot) at
Created 12/28/09 (77 days ago)
Due
Updated 01/12/10 (62 days ago)
Assigned 12/30/09 (75 days ago)
Resolved 12/30/09 (75 days ago)
Attachments
Milestone 1.2.4
Patch No

History
01/12/10 CVS Commit Comment #7 Reply to this comment
12/30/09 CVS Commit Comment #6 Reply to this comment
12/30/09 Jan Schneider Comment #5
Milestone ⇒ 1.2.4
State ⇒ Resolved
Assigned to Jan Schneider
Reply to this comment
Fixed, thanks!
12/30/09 CVS Commit Comment #4 Reply to this comment
12/30/09 Matt Selsky Comment #3 Reply to this comment
No.  We want the final result to look like (from "man procmailex":

           * ^From.*peter

There shouldn't be any slash characters.
12/30/09 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Hm, no, it's actually translated to:
* /^(To|Cc|Bcc|Resent-to|From|Sender|Reply-to|Resent-from):.*someaddress
and this looks like it's supposed to be a regular expression that's 
missing the closing slash. Can anybody confirm, that this is the 
correct the rule:
* /^(To|Cc|Bcc|Resent-to|From|Sender|Reply-to|Resent-from):.*someaddress/
12/28/09 rene (dot) plattner (at) uibk (dot) ac (dot) at Comment #1
State ⇒ Unconfirmed
Patch ⇒
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ Procmail script generation error
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Dear Horde Team!

I noticed a problem at procmail script generation.

'To,Cc,Bcc,Resent-to'

is translated to

* \^To,Cc,Bcc,Resent-to: ...

should be

* ^To,Cc,Bcc,Resent-to: ...

I solved this as follows:

--- ingo/lib/Script/procmail.php_orig   2009-11-11 08:55:31.000000000 +0100
+++ ingo/lib/Script/procmail.php        2009-11-11 08:59:06.000000000 +0100
@@ -640,7 +640,7 @@
               if (strpos($condition['field'], ',') == false) {
                   $string = '^' . $condition['field'] . ':';
               } else {
-                $string .= '/^(' . str_replace(',', '|',
$condition['field']) . '):';
+                $string .= '^(' . str_replace(',', '|',
$condition['field']) . '):';
               }
               $prefix = ' ';
           }