6.0.0-alpha12
6/7/25

[#8982] Ingo Procmail vacation rules bug
Summary Ingo Procmail vacation rules bug
Queue Ingo
Queue Version 1.2.3
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester rene.plattner (at) uibk (dot) ac (dot) at
Created 04/22/2010 (5525 days ago)
Due 04/30/2010 (5517 days ago)
Updated 08/07/2010 (5418 days ago)
Assigned
Resolved 08/07/2010 (5418 days ago)
Github Issue Link
Github Pull Request
Milestone 1.2.5
Patch No

History
08/07/2010 01:45:00 PM Jan Schneider Milestone ⇒ 1.2.5
 
08/07/2010 01:44:50 PM Jan Schneider Comment #5
Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒
Reply to this comment
06/28/2010 04:58:58 PM gaudenz (at) soziologie (dot) ch Comment #4
New Attachment: ingo_procmail_vacation_nodate_fix.patch Download
Reply to this comment
Is anyone working on this bug? IMHO this is a pretty serious issue. I 
can confirm that the patch the original submitter added in the bug 
text works. I have attached the same patch as an attachment in case 
this is more convenient to integrate.
04/26/2010 06:25:18 AM rene (dot) plattner (at) gmx (dot) at Comment #3 Reply to this comment
As a first step I added the c flag but I disvocered sometimes a dual 
delivery of mails.
So I decided to block the rule as the date rule version.
04/24/2010 07:56:43 PM president (at) cynicbytrade (dot) com Comment #2 Reply to this comment
I can verify that vacation generates a bad procmail script -- when the 
auto-reply is triggered normal delivery is not completed.

But the fix is much easier. There's just a missing "c" on the rule 
that actually sends the reply; we need procmail to reply to a copy of 
the message so that it continues rather than stopping after the reply 
is sent.

So the code should be:

$this->_action[] = '      | formail -rD 8192 
${VACATION_DIR:-.}/.vacation.' . $address;
$this->_action[] = '      :0 ehc';
$this->_action[] = '      | (formail -rI"Precedence: junk" \\';

Rather than the current:

$this->_action[] = '      | formail -rD 8192 
${VACATION_DIR:-.}/.vacation.' . $address;
$this->_action[] = '      :0 eh';
$this->_action[] = '      | (formail -rI"Precedence: junk" \\';

04/22/2010 06:54:04 AM rene (dot) plattner (at) uibk (dot) ac (dot) at Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒ MYASK
Queue ⇒ Ingo
Due ⇒ 04/30/2010
Summary ⇒ Ingo Procmail vacation rules bug
Type ⇒ Bug
Reply to this comment
I noticed that the vacation rule sends a vacation notice but didn't 
deliver the message.
The next message of the same sender is delivered.
This is caused because the last rule with the eh flags checks the 
result of the preceding rule. If the sender is not it the vacation 
file then the result of formail is an error and the last rule is 
executed und the script finish without to deliver the received 
message. So we need a carbon copy flag (c) to deliver the received 
message.
I added this flag to the last rule and discovered a double delivery of 
the message.
Then I used the vacation with a time window an discovered that it works.
Finally I used the time vacation code for the vacation without a time 
frame with removed time check rule.
So I updated the code as follows:

--- horde-orig/ingo/lib/Script/procmail.php       2009-09-16 
14:37:22.000000000 +0200
+++ horde-dev/ingo/lib/Script/procmail.php       2010-04-21 
10:00:29.000000000 +0200
@@ -491,9 +491,9 @@
                      $this->_action[] = '    :0 Whc: 
${VACATION_DIR:-.}/vacation.lock';
                      if ($timed) {
                          $this->_action[] = '    * ? test $DATE -gt 
$START && test $END -gt $DATE';
-                       $this->_action[] = '    {';
-                        $this->_action[] = '      :0 Wh';
                      }
+                    $this->_action[] = '    {';
+                    $this->_action[] = '      :0 Wh';
                      $this->_action[] = '      * ^TO_' . $address;
                      $this->_action[] = '      * !^X-Loop: ' . $address;
                      $this->_action[] = '      * !^X-Spam-Flag: YES';
@@ -524,9 +524,7 @@
                      $reason = addcslashes($reason, "\\\n\r\t\"`");
                      $this->_action[] = '       ' . 
$this->_params['echo'] . ' -e "' . $reason . '" \\';
                      $this->_action[] = '      ) | $SENDMAIL -f' . 
$address . ' -oi -t';
-                    if ($timed) {
-                        $this->_action[] = '    }';
-                    }
+                    $this->_action[] = '    }';
                      $this->_action[] = '  }';
                  }
              }

Kind regards,

Rene Plattner

Saved Queries