[Pymilter] Unknown mechanism found

Stuart D Gathman stuart at bmsi.com
Mon Jan 12 23:43:49 EST 2015


On Jan 12, Stuart D Gathman transmitted in part:

> On Jan 12, Stuart D Gathman transmitted in part:
>
>>  On Jan 10, Arnaud de Prelle transmitted in part:
>> 
>> >   At first sight this record looks correct except that it contains a
>> >   trailing space at the end of the record.
>> >   Is this against the RFC ?
>>
>>  Good question.  I'll check the spec to see if trailing space is allowed,
>>  and add a test case either way.  In any case, it is a silly thing for
>>  the publisher to do.
>
> The top level syntax is:
>  terms            = *( 1*SP ( directive / modifier ) )
>
> So yes, a trailing space is illegal, and sfr.fr should get a PermError.
> My in house system would also ban them because they do not accept mail
> to postmaster...
>
> (I'll probably add trimming the trailing space to the heuristics applied by 
> pymilter to get a "best guess" result by guessing
> what publishers probably meant.)
>
> If everyone agrees, I'll add a test case to the test suite to ensure
> compliant implementations give the PermError.

Actually, the *really* top level syntax is in 4.5/2:

record           = version terms *SP

So, trailing spaces *are* allowed.

So upgrade to the latest released version of pyspf (2.0.11), and pyspf will
allow trailing spaces.  I've updated the test case to reference 4.5/2 of
the spec and make sure trailing spaces *are* allowed.  :-}



More information about the Pymilter mailing list