On 01 mai 2020, at 18:28, Wietse Venema <[email protected]> wrote:
>>
>> would there be a performance/functionality penalty switching from
>> smtpd_proxy_filter to smtpd_milters/non_smtpd_milters?
>
> It will be faster, because it avoids the need to deliver the whole
> message outside of Postfix, and then to receive the whole message
> again into Postfix.
>
> Also, the logging will be easier to follow because there is only
> one queue file instead of two (one before amavisd and one after
> amavisd).
Thanks a lot. In mean time I've changed my all setup to use only milters (more
readable config). Unfortunately I've discovered that Amavisd is unable to add
headers I want as it would do as an smtp proxy filter.
It will properly add:
X-Virus-Scanned: my custom tag
X-Crm114-Status: UNSURE ( 6.79 )
but won't add:
X-Spam-Score: -3.714
X-Spam-Flag: NO
X-Spam-Level:
X-Spam-Status: No, score=-3.714 tagged_above=-6 required=3
tests=[ALL_TRUSTED=-1, ...
It bugs me, so I've tuned amavisd-milter to use it's "server" -D
delivery-care-of feature:
Set AM.PDP request attribute delivery_care_of to client
(default) or server.
When the client method is used, then amavisd-milter is responsible for
forwarding the message to the recipients. This method does not allow
personalized header or body modification.
When the server method is used, then amavis is responsible for
forwarding the message to the recipients and may personalize the
headers and the body of the messages. $forward_method variable in
amavisd.conf must point to a place willing to accept the message
without further checking in amazes.
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.
I'm still wondering how it can add the X-Crm114-Status header (amavisd uses
spamassassin and spamassassin uses crm114, quite far fetched) but seems unable
to add it's own personalized headers.
patpro