Filter works great, Milter does not (despite log shows actions performed)
chriskent_developer at hotmail.co.uk
Fri Aug 1 18:40:26 CEST 2014
Thanks for taking the time, I've got a quick question please about the amavisd-milter, which is telling me that it is taking actions in the logs, but seemingly not preforming those actions.
Briefly, here's the setup- standard Postfix/Amavis (etc) mail stack. Amavisd-new has been configured to scan and filter all mail arriving via SMTP, which it does perfectly. It also adds a disclaimer using Altermime for outgoing mail.
However, if the outgoing mail is sent from a local Unix account (e.g. www-data; from a PHP script, or even simply the sendmail command), the Unix sendmail does not use SMTP to send the message for delivery. So I have configured Postfix to use amavisd-milter for such mail, using the following Postfix configuration: non_smtpd_milters = inet:127.0.0.1:60001
This all works perfectly (thank you amavis team!)- the mail is indeed passed to the amavis-milter (seen in the logs), and apparently even the disclaimer is added:
Aug 1 amavis: (21917) lookup: (scalar) matches, result="disclaimer"
Aug 1 amavis: (21917) lookup [Mangling1] => true, "xxx at xxx-xxx.xxx" matches, result="disclaimer", matching_key="(constant:disclaimer)"
Aug 1 amavis: (21917) lookup_acl(aaa at aaa.aa) matches key "aaa.aa", result=1
Aug 1 amavis: (21917) lookup [local_domains] => true, "aaa at aaa.aa" matches, result="1", matching_key="aaa.aa"
Aug 1 amavis: (21917) mangling YES: disclaimer (was: disclaimer), discl_allowed=1, <aaa at aaa.aa> -> <xxx at xxx-xxx.xxx>
However the email body does not include the signature, although it does include the headers from avamisd-milter?
X-Amavis-Modified: Mail body modified (using disclaimer) - xxx-xxx.xxx
X-Virus-Scanned: Debian amavisd-new at xxx-xxx.xxx
If I send email using the same email address via SMTP, the correct signature is added. I have tried this on 2 different machines with the same (actions logged but no actions taken) result.
To: aaa at aaa.aa
From: xxx at xxx-xxx.xxx
Message-Id: <20140801153241.6F2B422403 at xxx-xxx.xxx>
Date: Fri, 1 Aug 2014 17:32:41 +0200 (CEST)
Does anyone please know what might be going wrong here- why no signature is added despite the config and logs showing that they are?
Or perhaps there is some more simple method for adding a signature to these 'local outgoing messages' that I have missed?
More information about the amavis-users