On Mon, 26 Jan 2004, Regis Wilson wrote:

> As was noted before, a negative test will false-positive when there is
> no X-O-IP header.

Right, but I did resubmit the rule with an [if-unset] clause added.  If
you missed that message, I can resend you a copy off-list, but the gist
is to simply append "[if-unset 0.0.0.0]" which will satisfy the test if
the header is not present.

> Thus,  (compound rule omitted)

I prefer to avoid the compound rule in this case, since a) it _can_ be
avoided, b) the single rule is less work for the mail server (my mail
servers are quite powerful systems, but they process a lot of mail and
adding unnecessary tests is starting to become an issue for me), and c)
it's easier for a human to read and understand the single rule, which
makes for easier maintenance.

In other cases, a compound rule is the only reasonable approach, of
course ...

> (My code is more strict about the format of the IP address, but it's
>  the same thing...)

Right.  I had contemplated an almost identical stricter IP address check,
but decided that for the purpose at hand it really isn't necessary.
This isn't being used to determine where the message will be sent,
after all, just whether or not the message has this header's content
properly formatted if it's present.  The simpler check for a dotted-quad
with optional surrounding brackets is (in my opinion, of course), easier
to read and understand, and likely less work for the software to check
against (though I have no benchmarking tests to support that hypothesis).

The readability is rather important to me, in cases where others will
need to understand what I've written.

-- 
----------------------------------------------------------------------
Sylvain Robitaille                              [EMAIL PROTECTED]

Systems analyst / Postmaster                      Concordia University
Instructional & Information Technology        Montreal, Quebec, Canada
----------------------------------------------------------------------



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to