[Pymilter] SPF timeout

Stuart D. Gathman stuart at bmsi.com
Wed Apr 23 14:50:50 EDT 2008


On Wed, 23 Apr 2008, Miguel Filho wrote:

> Although, there is no parameter to set a timeout and limit for how
> long pydns will try to resolve a name. Would be possible to add this?
> I think just a global variable would be sufficient and use it on the
> DNSLookup function. pydns default timeout is 30 seconds, and that too
> high for a busy e-mail server to wait.

In DNSLookup, add timeout= to DnsRequest.  E.g.

	req = DNS.DnsRequest(name, qtype=qtype, timeout=10)

As far as adding to pyspf API, I'm thinking that a keyword arg
to the query constructor would be best.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Pymilter mailing list