Thanks Victor,

Your statement that “header and body checks run first, then milters” is very 
clear, but the MILTER_README.html seems to suggest that processing occurs 
before queueing, and I had interpreted that as implying that milters run before 
cleanup/header_checks in the flow.

My understanding was consistent with the documentation in the sense that if I 
modify the From: header using header_checks, the milters would still see the 
original From: value rather than the modified one.

This is why I am a bit confused about the exact ordering and how cleanup, 
header_checks, and smtpd_milters interact internally.
In summary, I just want to confirm the precise order of execution between 
header_checks, smtpd_milters, and milter_header_checks, because depending on 
how it is interpreted, it can sometimes appear that one runs before the other 
or vice versa.
Thanks again for the clarification!

Pete


    On Monday, May 18, 2026 at 12:21:32 PM GMT+2, Pedro David Marco 
<[email protected]> wrote:  
 
 Hi,
I am trying to understand the exact execution order between 
header_checks/cleanup and smtpd_milters.
I have a custom milter that repairs invalid From: headers 
Example flow from logs:
1.- cleanup logs a header_checks warning on the original header From: 
<[email protected]>
2.- Then my milter replaces it with: From: <[email protected]>
3.- milter works ok, since postcat shows the corrected header in the queued 
message.
What confuses me is that according to my reading of MILTER_README, smtpd 
milters run before queuing, so I expected cleanup/header_checks to see the 
modified header rather than the original one. However, the log shows that 
cleanup sees [email protected] and not [email protected].
Am I misunderstanding how cleanup interacts with SMTP milters internally?
Thanks
Pete.
  
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to