<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Wrong &quot;Received:&quot; regexp used in vacation date with sieve</title> 
  <pubDate>Fri, 10 Apr 2026 16:48:42 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7023</link> 
  <atom:link rel="self" type="application/rss+xml" title="Wrong &quot;Received:&quot; regexp used in vacation date with sieve" href="https://bugs.horde.org/ticket/7023/rss" /> 
  <description>Wrong &quot;Received:&quot; regexp used in vacation date with sieve</description> 
 
   
   
  <item> 
   <title>The sieve module of Ingo creates date matching rules if a va</title> 
   <description>The sieve module of Ingo creates date matching rules if a vacation date (start and end) is specified. These rules work correctly from the 10th to the 31st of each month but not from the 1st until the 9th. 



The reason is that the generated regex searches for dates like &#039;04 Jul 2008&#039;. However, each server I&#039;ve seen (Postfix, MS Exchange) inserts this date as &#039;4 Jul 2008&#039;, without a leading zero.



The following diff seems to fix this issue.



# diff --normal lib/Script/sieve.php.ori lib/Script/sieve.php

2753c2753

&lt;         $code = &#039;if  header :regex &quot;Received&quot; &quot;^.*(&#039; . str_pad($begin, 2, &#039;0&#039;, STR_PAD_LEFT);

---

&gt;         $code = &#039;if  header :regex &quot;Received&quot; &quot;^.*(&#039; . str_pad($begin, 2, &#039; &#039;, STR_PAD_LEFT);

2755c2755

&lt;             $code .= &#039;|&#039; . str_pad($i, 2, &#039;0&#039;, STR_PAD_LEFT);

---

&gt;             $code .= &#039;|&#039; . str_pad($i, 2, &#039; &#039;, STR_PAD_LEFT);



If there are mail servers that use the 04 format, maybe we should use &quot;[0 ]$i&quot; instead of the str_pad stuff in the regexp.</description> 
   <pubDate>Fri, 04 Jul 2008 10:14:03 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7023#t47199</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/ingo/lib/Script/sieve.php?r1=1.116&amp;r2=1.117&amp;ty=u</description> 
   <pubDate>Fri, 04 Jul 2008 16:58:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7023#t47218</link> 
  </item> 
   
  <item> 
   <title>Both is quite common, so I had to go the [0  ] route.</title> 
   <description>Both is quite common, so I had to go the [0  ] route.</description> 
   <pubDate>Fri, 04 Jul 2008 17:00:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7023#t47221</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
