Am Do, 6.09.2012, 13:08 schrieb Andreas Schulze:
> Is it possible to use the result of the milter in the same way SA would do 
> with its own SPF implementation?
> Than the SPF information could have an influance to the spamcore.

I run smf-spf milter (sf.net/projects/smfs) and applied a number of patches.
Among them a patch to use the milter api function "INSERT header" instead of 
"ADD header".
Intension was to not append new headers at bottom but insert them on top 
(logical: in place)

The milter documentation (https://www.milter.org/developers/api/smfi_insheader) 
mention "idx: 0 makes it the topmost header"

Sounds fine. But there is a hidden side effect I learned today:

Added header from one milter are visible to the next milter.
But that seem not true if inserting at position 0. Then the insert is delayed 
until all milters
are finished. Now the header is "on Top". But the header is hidden to other 
milters.
So my amavisd-milter -> amavisd-new -> spamassassin chain never saw the 
Received-SPF header.

simple solution: I modified my patch to insert at position 1.
Instantly the Received-SPF Header was visible to spamassassin and sa start 
using the header.
No writing rules, no other sa voodoo. spamassassin does simple it's job :-)

Andreas

Reply via email to