<div dir="auto">Create a two instance postfix setup.. the localhost instance handles the pflogsumm emails</div><div class="gmail_extra"><br><div class="gmail_quote">On Apr 28, 2017 19:44, "Simon Wilson" <<a href="mailto:simon@simonandkate.net">simon@simonandkate.net</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">----- Message from Dominic Raferd <<a href="mailto:dominic@timedicer.co.uk" target="_blank">dominic@timedicer.co.uk</a>> ---------<br>
Date: Fri, 28 Apr 2017 11:55:03 +0100<br>
From: Dominic Raferd <<a href="mailto:dominic@timedicer.co.uk" target="_blank">dominic@timedicer.co.uk</a>><br>
Subject: Re: Pflogsumm emails through amavisd and SA hitting BAYES_99<br>
To: <a href="mailto:amavis-users@amavis.org" target="_blank">amavis-users@amavis.org</a><div class="elided-text"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 28 April 2017 at 11:34, Simon Wilson <<a href="mailto:simon@simonandkate.net" target="_blank">simon@simonandkate.net</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I have pflogsumm running log summaries on my postfix install, and sending<br>
to an address that resolves locally. All is on localhost, which is a newly<br>
installed CentOS7 server, amavisd-new 2.10.1 from EPEL.<br>
<br>
The pflogsumm emails from root are triggering BAYES_99 as they go through<br>
amavisd-new and spamassassin, and are often ending up marked as spam.<br>
<br>
What's the best way to ensure that those are not flagged as spam, or<br>
potentially to whitelist them somehow?<br>
</blockquote>
<br>
<br>
You can whitelist sender addresses, would this solve your problem? I have<br>
these lines in /etc/amavis/conf.d/50-user:<br>
<br>
read_hash(\%whitelist_sender, '/etc/amavis/whitelist');<br>
@whitelist_sender_maps = (\%whitelist_sender);<br>
bypass_spam_checks_maps => ['@whitelist_sender_maps'], # don't<br>
spam-check this mail<br>
bypass_banned_checks_maps => ['@whitelist_sender_maps'], # don't<br>
banned-check this mail<br>
bypass_header_checks_maps => ['@whitelist_sender_maps'], # don't<br>
header-check this mail<br>
<br>
File /etc/amavis/whitelist contains a line-by-line list of whitelisted<br>
addresses. To whitelist a whole domain, just precede with a dot. Examples:<br>
<br>
<a href="mailto:fred@bloggs.com" target="_blank">fred@bloggs.com</a><br>
.<a href="http://spammers-united.com" rel="noreferrer" target="_blank">spammers-united.com</a><br>
<br>
HTH, Dominic<br>
</blockquote>
<br>
<br></div>
----- End message from Dominic Raferd <<a href="mailto:dominic@timedicer.co.uk" target="_blank">dominic@timedicer.co.uk</a>> -----<br>
<br>
Thanks Dominic... it seems like a bit of a 'sledgehammer' to whitelist a sender address, when sender addresses can be spoofed. Perhaps I'm being paranoid :) Keen to hear feedback on that (the approach, not whether I am paranoid :) ).<br>
<br>
One thing I just noticed is that pflogsumm emails are dropped into Postfix (and thence into Amavisd) via postfix/pickup not postfix/smtpd. I wonder if there is a way there to mark emails from localhost root that are fed into postfix/pickup as being not spam-checked.<div class="elided-text"><br>
<br>
Simon.<br>
<br>
<br>
-- <br>
Simon Wilson<br>
M: 0400 12 11 16<br>
<br>
</div></blockquote></div><br></div>