On Thursday 09 July 2009 01:51:38 pm Wietse Venema wrote: > Alban Deniz: > > On Thursday 09 July 2009 01:01:28 pm Wietse Venema wrote: > > > Alban Deniz: > > > > Hello, > > > > > > > > I've implemented a milter (SNFMilter), and when I use it with > > > > postfix, and send postfix multiple messages over one SMTP connection, > > > > I get the following warning in the log file: > > > > > > > > Jun 18 10:32:58 skidmark postfix/smtpd[11622]: warning: milter > > > > unix:/snf- milter/socket: unexpected filter response SMFIR_ADDHEADER > > > > after event SMFIC_MAIL > > > > > > According to http://www.milter.org/developers/api/smfi_addheader, > > > Milter applications can send requests to add headers ONLY at the > > > end-of-message protocol stage. > > > > > > Wietse > > > > Hi Wietse, > > > > Thanks for the response. > > > > My code calls smfi_addheader only in the xxxx_eom callback, which I > > understand is the end-of-message protocol stage (please correct me if I'm > > wrong). > > Postfix receives the "add header" request when it reports a "mail > from" command to the Milter.
I'm not sure I understand--Doesn't postfix report a "mail from" command to the Milter by invoking the xxfi_envfrom callback? As I understand it, that isn't the end-of-message protocol stage. In the control flow diagram (https://www.milter.org/developers/overview#ControlFlow), it seems that when postfix invokes xxfi_eom, then the processing is in the end-of-message protocol stage. So, calling smfi_addheader in xxfi_eom shouldn't be a problem. Am I understanding it correctly? > You can see the sequence of commands and replies by turning on > Postfix verbose logging, or you can dump and decode the UNIX-domain > stream for yourself. Thanks. I'll turn on verbose logging. Is there any document I need to refer to in order to understand the verbose logging messages? Thanks, Alban