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 (at) horde (dot) org |
Requester | bb (at) apc (dot) ag |
Created | 07/04/2008 (6211 days ago) |
Due | |
Updated | 07/04/2008 (6211 days ago) |
Assigned | |
Resolved | 07/04/2008 (6211 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Assigned to Jan Schneider
State ⇒ Resolved
Patch ⇒ No
http://cvs.horde.org/diff.php/ingo/lib/Script/sieve.php?r1=1.116&r2=1.117&ty=u
Priority ⇒ 2. Medium
New Attachment: sieve-vacation-date.patch
Patch ⇒ Yes
Milestone ⇒
Summary ⇒ Wrong "Received:" regexp used in vacation date with sieve
Type ⇒ Bug
State ⇒ Unconfirmed
Queue ⇒ Ingo
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);
< $code .= '|' . str_pad($i, 2, '0', STR_PAD_LEFT);
---
"[0 ]$i" instead of the str_pad stuff in the regexp.