[Mimedefang] SPF in MD
Michael Faurot
mfaurot at atww.org
Fri Oct 8 12:08:14 EDT 2004
In article <1097235425.3912.4.camel at nomad> you wrote:
> Has anyone used mime-defang filters to do any portion of the SPF
> implementation? What i mean is, has anyone constructed a MD filter that
> deals with email based on the results of spf records?
I implemented a front-door check in MD's filter_sender() function to do
rejections based on "fail" results. I then inserted my own Received-SPF
headers and created rules for SpamAssassin v2.X to score against for
all the other SPF results. Since SpamAssassin v3.0.0 has come out,
I could use those SPF tests now, instead of the ones I created.
It's fairly easy to implement SPF within MD, especially to do rejections
based on "fail" results. Much easier than implementing SRS[1], as I'm
discovering. At a high level you would do the following:
o) Install the Perl module Mail::SPF::Query.
o) Insert a "use Mail::SPF::Query;" line into
mimedefang-filter.
o) Put together a function to do the SPF query or
integrate it directly into filter_sender().
o) If you get a "fail" result from the query you can
then reject the message.
o) For all the other SPF results, you don't need to
do anything, just let SA v3.0.0 score them.
If you want to see some actual code to do this, I can post it here
(someone please advise if that's appropriate) or make it available
elsewhere.
[1]: http://lists.roaringpenguin.com/pipermail/mimedefang/2004-September/024722.html
More information about the MIMEDefang
mailing list