spf-discuss
[Top] [All Lists]

Re: When should the proccessing of the SPF record end?

2004-03-23 08:19:56
In <7979308(_at_)pamho(_dot_)net> "Roger Moser" 
<Roger(_dot_)Moser(_at_)pamho(_dot_)net> writes:

Meng Weng Wong wrote:

Mail::SPF::Query does a parsing pass first where it separates mechanisms
from modifiers and an interpretation pass second where it runs the
mechanisms.

Yes, I was aware that M:S:Q makes two passes, but it never checks for
syntax errors.


My routine does it in one pass and I don't like to unnecessarily spend CPU
time after a match or an error.

You have to continue parsing to check for syntax errors anyway.


libspf-alt solves the "excess CPU" problem by byte-compiling the SPF
record on the first pass, eliminating all parsing overhead on
subsequent usage of the same SPF record.  So, if you get a lot of
email from AOL, you will have the advantages of complete and accurate
parsing, and yet have reduced CPU compared with one-pass methods.



-wayne