I'm looking at Gordon Messmer's new (1.9) ratelimit.py module for his
excellent pythonfilter suite.

Ratelimit.py pulls information about the origin of an email from the
Received-From-MTA data for it stored locally.  This information is
defined in RFC 1894.  The first field in this data is the mta-name-type,
which is "dns" in all the mails I've seen accepted by courier.  The
second field, mta-name, is formatted according to RFC 3461 (9.3)
defining the format for the "dns" mta-name-type as:

        MTA names of type "dns" SHOULD be valid Internet domain names.
        If such domain names are not available, a domain-literal
        containing the internet protocol address is acceptable.  Such
        domain names generally conform to the following syntax:

                domain = real-domain / domain-literal

                real-domain = sub-domain *("." sub-domain)

                sub-domain = atom

                domain-literal = "[" 1*3DIGIT 3("." 1*3DIGIT) "]"

        where "atom" and "DIGIT" are defined in [2].

Gordon's ratelimit.py from courier-pythonfilter-1.9 is optionally
network-aware, but if the network-aware code is to work properly it MUST
assume that the Received-From-MTA data is purely of the form
domain-literal, as defined above, without real-domain data, which is
optional ("SHOULD") but always present in what I see here.

Received-From-MTA data here is always of the form:

    dns; real-domain (domain-literal)

or

    dns; real-domain (real-domain domain-literal)

Under what condition(s) in the courier configuration is this true?  Is
this version-dependent?  Is there a courier config setting under which
this is simply:

    dns; (domain-literal)

... as requrired by ratelimit.py 1.9?

It would be good to know if perhaps Gordon and I are looking at
different courier behaviors before I make further suggestions about his
code.  As courier is configured here, ratelimit.py requires patching to
be network aware, but this may not always be the case if courier is
configured differently.

-- 
Lindsay Haisley       | "The only unchanging certainty
FMP Computer Services |    is the certainty of change"
512-259-1190          |
http://www.fmp.com    | - Ancient wisdom, all cultures


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to