spf-discuss
[Top] [All Lists]

Re: SV: Re: some stats on SPF and C-ID publishing

2004-05-28 11:10:41
On Fri, 2004-05-28 at 03:31, Lars Dybdahl wrote:
XML is simple enough.

Yesterday I had to write some code that reads XML stuff. The tool is
Delphi 7, and I was recommended by several people to choose the XML
reader from the Open Source JEDI project, which I did. The JEDI project
for Delphi has been around for years, and the XML parser has also been
there for years. Unfortunately, it wasn't able to read stuff like
<lbf:test>asdf</lbf:test> correctly, so I had to modify the parser code
to actually make it work.

I bet just as much modification would be required to make RFC2822 header
parsing code (which already exists in every MTA) parse SPF also, which I
suggested before in
http://archives.listbox.com/spf-discuss(_at_)v2(_dot_)listbox(_dot_)com/200405/0227.html
Although I looked at doing this for postfix (extremely briefly) and it
was looking easier to just implement an SPF parser rather than trying to
make the postfix header parsing code slightly more generic.  A better
programmer might think otherwise though.

In other words, a well proven XML parser, recommended by several
professional programmers doing XML very often, had simple errors that
made it impossible to read XML compliant files.

XML has much more features than what we need, and they all need to be
implemented if we want to say that this is XML.

By avoiding XML, we save ourselves from a lot of work and trouble.

One thing I'm trying to come to terms with concerning XML is that XML
will allow greater extensibility than the SPF syntax.  Sure, we say we
need extensibility, but you can not extend the v=spf1 at all without
breaking the interpretation of your SPF record and falling back on
UNKNOWN/softfail.  Since no new constructs can be added, extensibility
is of little concern.  Of course, that's why the v= SPF construct
exists.  There has been little talk of the specifics in SPF record
interpretation for XML.  While you can add new directives to XML
(although as easily as you can to v=spf1 syntax), that doesn't
necessarily allow you to DO anything different with those directives
because of the way the SPF interpreation engine is supposed to work:
producing UNKNOWN when unknown directives are encountered.

See the couple of messages around
http://archives.listbox.com/spf-discuss(_at_)v2(_dot_)listbox(_dot_)com/200405/0228.html

While an SPF-in-XML parser can be 2k (or under 20k, whatever), how big
is a v=spf1 parser?
-- 
Andy Bakun <spf(_at_)leave-it-to-grace(_dot_)com>