Amavis-new whitelist sender address and mail log

Dominic Raferd dominic at timedicer.co.uk
Tue Jan 8 08:36:25 CET 2019


On Tue, 8 Jan 2019 at 07:09, Admin Beckspaced <admin at beckspaced.com> wrote:
>
> Hello there ;),
>
> I've set a sender address to be whitelisted by amavis-new.
> If I look in the amavis-new log:
>
> 2019-01-07T05:55:43.476393+01:00 cx20 amavis[14703]: (14703-20) Passed
> CLEAN {RelayedInbound}, EXTERNAL [129.41.222.125]:37319 [129.41.222.125]
> <sender at sending-domain.com> -> <recipient at domain.com>, Queue-ID:
> ED4FC1A1EDA, Message-ID:
> <1357051094.785971071546836934544.JavaMail.app at rbg73.sng01is>, mail_id:
> SbCRIirAbHc6, Hits: -, size: 10027, queued_as: 6EA4A1A1EDB,
> dkim_sd=sending-domain.com, 133 ms
>
> So in the log there's Hits: -,
>
> Is this the only way how I can recognize a whitelisted sender address in
> the log?

Yes, I think, without raising log level to 5 or changing the code

> Or is there an option to have the log entry display 'whitelisted sender
> address' or something similar?
> to make it more easy to find whitelisted addresses in the log ;)

The easiest way to get a special log entry is to modify the log level
for the relevant line in amavisd-new:

Find this line (using amavisd-new 2.11.1):
do_log(5,'wbl: recip <%s> whitelisted sender <%s>', $recip,$sender);
and change 5 to 0, then restart amavis

Note: as this extra logging will reveal, whitelisting works against
*both* the envelope sender address and against the 'From' header
address. IMO this is a bit unsafe, so I have changed it in mine to
skip the envelope sender.


More information about the amavis-users mailing list