[Tickets #14486] Vacation over two mounth causes sieve script to crash
    noreply at bugs.horde.org 
    noreply at bugs.horde.org
       
    Thu Oct  6 15:11:39 UTC 2016
    
    
  
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/14486
------------------------------------------------------------------------------
  Ticket             | 14486
  Created By         | philipp.faeustlin at uni-hohenheim.de
  Summary            | Vacation over two mounth causes sieve script to crash
  Queue              | Ingo
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------
philipp.faeustlin at uni-hohenheim.de (2016-10-06 15:11) wrote:
I think I found a bug, where the by ingo generated sieve script  
crashes with "error: duplicate vacation action not allowed"
I my case the user had the message for Sep 30 and Oct 1 activated,  
which generates following script part:
..................................................................
if header :regex "Received" "^.*(Sep) (\\(.*\\) )?.... (\\(.*\\)  
)?..:..:.. (\\(.*\\) )?((\\+|\\-)[[:digit:]]{4}|.{1,5})(\\(.*\\))?$" {
     if header :regex "Received" "^.*(30) (\\(.*\\) )?... (\\(.*\\)  
)?.... (\\(.*\\) )?..:..:.. (\\(.*\\)  
)?((\\+|\\-)[[:digit:]]{4}|.{1,5})( \\(.*\\))?$" {
     vacation :addresses ["..."] :subject "..." "...";
}
}
if header :regex "Received" "^.*(Oct) (\\(.*\\) )?.... (\\(.*\\)  
)?..:..:.. (\\(.*\\) )?((\\+|\\-)[[:digit:]]{4}|.{1,5})( \\(.*\\))?$" {
     if header :regex "Received" "^.*([0 ]1) (\\(.*\\) )?... (\\(.*\\)  
)?.... (\\(.*\\) )?..:..:.. (\\(.*\\)  
)?((\\+|\\-)[[:digit:]]{4}|.{1,5})( \\(.*\\))?$" {
     vacation :addresses ["..."] :subject "..." "...";
}
..................................................................
He received a message which contained following Received lines...
Received: ... Sat, 01 Oct 2016 03:26:19 +0200
Received: ... Fri, 30 Sep 2016 21:17:58 -0400
With such message all if clauses are true and the sieve script crashes  
at the second "vacation" action and the rest of the script isn't  
executed.
Solution:?
 From my point of view the solution for the problem is to use elseif  
(elif) for checking the the second, third, ... month of the vacation  
message.
    
    
More information about the bugs
mailing list