[Pymilter] Documentation

Stuart D. Gathman stuart at bmsi.com
Fri Nov 21 13:05:15 EST 2008


On Fri, 21 Nov 2008, Rob Dudley wrote:

>    I was wondering if there was any documentation of the methods, etc.
>    made available by the Milter module. I'm looking to implement some
>    quite complex bits and pieces and have already had a hankering for a
>    look "under the hood".

The "milter" module implements the C API pretty directly.  The new
features introduced in 8.14 (notably smfi_chgfrom) are not done yet
(need to get sendmail-8.14 compiled for EL5).  Check the C API link.

The "Milter" module is a thin wrapper.  It hooks all the callbacks,
so you just need to derive from Milter.Milter and override the
stub methods (which just log the call).

Ok, you probably already figured that much out, what you *really*
want to know about is the other miscellaneous modules in Milter.
While they are in there because I think they are general purpose,
the docs are just the doc comments.

Here are the ones most likely to be useful in your own milter:

Milter.dns	high level wrapper around pydns
Milter.config	extend ConfigParser with nobrainer stuff
Milter.dynip	heuristically decide whether a hostname is "dynamic"
		(created automatically based on IP by the ISP)
Milter.greylist	Keep a greylisting database
Milter.utils
	iniplist	check if an ip is in a CIDR list
	parseaddr	split email into fullname and address
	parse_addr	split address into localpart and hostname
	parse_header	remove obfuscated encoding from header

-- 
	      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