| Summary | Wrong "Received:" regexp used in vacation date with sieve |
| Queue | Ingo |
| Queue Version | 1.2 |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | Jan Schneider <jan (at) horde (dot) org> |
| Requester | bb (at) apc (dot) ag |
| Created | 07/04/2008 (65 days ago) |
| Due | |
| Updated | 07/04/2008 (65 days ago) |
| Assigned | |
| Resolved | 07/04/2008 (65 days ago) |
| Attachments | |
| Milestone | |
| Patch | No |
Patch ⇒
State ⇒ Resolved
Assigned to Jan Schneider
http://cvs.horde.org/diff.php/ingo/lib/Script/sieve.php?r1=1.116&r2=1.117&ty=u
New Attachment: sieve-vacation-date.patch
Patch ⇒ 1
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ Wrong "Received:" regexp used in vacation date with sieve
Type ⇒ Bug
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
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 '04 Jul
2008'. However, each server I've seen (Postfix, MS Exchange) inserts
this date as '4 Jul 2008', without a leading zero.
The following diff seems to fix this issue.
# diff --normal lib/Script/sieve.php.ori lib/Script/sieve.php
2753c2753
< $code = 'if header :regex "Received" "^.*(' .
str_pad($begin, 2, '0', STR_PAD_LEFT);
---
str_pad($begin, 2, ' ', STR_PAD_LEFT);
---
"[0 ]$i" instead of the str_pad stuff in the regexp.