[Tickets #5843] Re: spam-filtering for maildrop
bugs at bugs.horde.org
bugs at bugs.horde.org
Tue Nov 20 18:06:41 UTC 2007
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=5843
-----------------------------------------------------------------------
Ticket | 5843
Updated By | horde at nospam.obeliks.de
Summary | spam-filtering for maildrop
Queue | Ingo
Version | HEAD
Type | Enhancement
State | Feedback
Priority | 2. Medium
Owners | Chuck Hagenbuch
+New Attachment | maildrop.diff
-----------------------------------------------------------------------
horde at nospam.obeliks.de (2007-11-20 10:06) wrote:
>> Thanks for catching that. I've taken another shot at it based on your
>> example. Can you please check:
>>
http://cvs.horde.org/diff.php/ingo/lib/Script/maildrop.php?r1=1.17&r2=1.18&ty=u
>>
>> Thanks!
>
> Looks much better, but it still won't work, if the conditions are
> joined by OR. I'll take a shot at it these days, some of the
> refactoring I've planned to do sometime... Hang on ;) If it's urgent,
> I'm sure we can find a fix without the restructuring.
I'm sorry, I just learned that && has a higher precedence than ||, so your
code should work fine even if conditions are joined by OR.
However the 'not equal' test should use != as operator, instead of
! /Header:.../ && $MATCH1 == condition,
because that would indeed not work. Furthermore, 'not equal' must then be
excluded from the negation above (line 557 in HEAD). Patch attached.
PS: The patch also removes some duplicated code by defining the numerical
relation operators in an instance variable. Remove this if you don't find
it appropriate.
More information about the bugs
mailing list