On 02 mai 2020, at 14:19, Wietse Venema <wie...@porcupine.org> wrote: > > Patrick Proniewski: >> It negates the benefit you were writing about as amavisd-milter >> will drop the message on the milter interface (postfix/cleanup[26401]: >> 87E5316135: milter-discard: END-OF-MESSAGE from localhost[127.0.0.1]: >> milter triggers DISCARD action) and re-inject it in an after-queue >> SMTP with no filtering. No big deal for me. > > Well that is broken. It should NOT return a DISCARD to Postfix then > re-inject the entire message over SMTP. > > Instead it should just return an OK for Postfix to deliver the > message (after adding the headers). > > Once you turn off the re-inject-over-SMTP it might actually try > to add headers to the message.
well in fact I've tried the default settings first ("client" as per <https://manpages.debian.org/testing/amavisd-milter/amavisd-milter.8.en.html#D>), the milter works as expected but won't add X-Spam-* headers. I get the headers I want if I let amavisd deliver the mail, instead of amavisd-milter. You suggest I disable the $forward method in amavisd.conf and keep "-D server" for amavisd-milter? I can try that. patpro