[Mimedefang] SPF in MD

Michael Weiner hunter at userfriendly.net
Fri Oct 8 18:40:57 EDT 2004


On Fri, 2004-10-08 at 12:08 -0400, Michael Faurot wrote:
> 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.
> 

Thank you for the detail. I appreciate your taking the time to do this
to help educate a somewhat MD newbie. Agreed, i have been using SA3
since the first rc came out and have been loving it, especially since
the SPF checks are there, but i was interested in the exercise through
MD which you have described above.

Yes, example code illustrating a real life working example is VERY
helpful, and is the method i believe most of us learn from.

Thanks again for ALL your time in your response.
Michael Weiner

All information contained in this email is confidential and may be used by the intended recipient only.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20041008/213b0ae2/attachment-0003.sig>


More information about the MIMEDefang mailing list