> -----Original Message-----
> From: owner-postfix-us...@postfix.org 
> [mailto:owner-postfix-us...@postfix.org] On Behalf Of Steve Fatula
> Sent: Tuesday, August 09, 2011 11:48 PM
> To: Postfix Users
> Subject: Order of milter execution
> 
> Using Postfix 2.8.4, I have the following options to smtpd:
> 
> -o content_filter=dspam:unix:/var/dspam/dspam.sock -o
> smtpd_milters=unix:/var/run/clamav/clamav-
> milter.sock,unix:/var/run/opendkim/opendkim.sock,unix:/usr/local/var/mi
> lter-greylist/milter-greylist.sock
> 
> Reading the postfix doc, it says that "Milter applications are applied
> in the order as specified". Yet, in the maillog I see milter-greylist
> listing messages before opendkim. I was wanting to use the results of
> opendkim in milter-greylist. Perhaps that is not really possible?
> 
> My guess, from my limited milter understanding, is they are executed
> piecemeal and that order is perhaps not so predictable.

In the sendmail implementation, milters operate in order specifically so that 
filters later in the chain see the effects of those that come before.  For 
example, a header field added by the first one is visible to all the others.  
This is really the only practical option since doing them all in parallel might 
mean two filters request changes to the messages that conflict because their 
respective "views" show the original message, not the modified one.

I can't imagine postfix would have done it any differently, partly because of 
the above design, and partly because that would mean the same combination of 
filters would have a different outcome if you change MTAs, and that's just not 
good.

-MSK

Reply via email to