6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/10/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#7023] Wrong "Received:" regexp used in vacation date with sieve
*
Your Email Address
*
Spam protection
Enter the letters below:
..__ ..___. __ |[__) | _/ / ` \__|| \__|./__.\__.
Comment
> 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 '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); > > --- > >> $code = 'if header :regex "Received" "^.*(' . >> str_pad($begin, 2, ' ', STR_PAD_LEFT); > > 2755c2755 > > < $code .= '|' . str_pad($i, 2, '0', STR_PAD_LEFT); > > --- > >> $code .= '|' . str_pad($i, 2, ' ', STR_PAD_LEFT); > > > > If there are mail servers that use the 04 format, maybe we should use > "[0 ]$i" instead of the str_pad stuff in the regexp.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers