6.0.0-beta13
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/11/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#5843] spam-filtering for maildrop
*
Your Email Address
*
Spam protection
Enter the letters below:
.___..___. ..__ . , | [__ |_/ | \ \./ | | | \|__/ |
Comment
> Actually, this patch will not work at all. > > > > The way maildrop condition generation works atm, each condition > starts with /^ > > (see this line: $string .= '/^' . $condition['field'] . ':\\s*';), > > which starts a regular expression. > > Like I said in bug #5816, implementing numerical comparisons would > require more changes to the script. > > > > In a maildrop script, a numerical comparison (e.g. >=) for a certain > header field (e.g. HeaderName) and a certain value (e.g. 5, from > (int)$condition['value']) would best be implemented as > > (/^HeaderName:\s*(\d+(\.\d+)?)/h && $MATCH1 >= 5) > > > > This would work fine with the current script generation algorithm, > except an opening parenthesis would have to be added at the beginning > of a condition for numerical comparisons, and the second part of the > condition would have to be added AFTER the regular expression is > closed and also AFTER the flags are added (which is why I didn't > implement this in the above mentioned bug/patch, but tried to > restructure the whole thing to make it more readable). > > > > However, If I got that right, the current HEAD of the maildrop.php > however will produce something like > > /^HeaderName:\s* >= 5/h > > which is of course complete bogus. > > > > Please revert the changes until a proper patch is provided. > >
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