]> gitweb.michael.orlitzky.com - amavis-logwatch.git/log
amavis-logwatch.git
6 years agoIgnore errors from the File::LibMagic describe_filename function.
Michael Orlitzky [Thu, 7 Sep 2017 11:36:39 +0000 (07:36 -0400)]
Ignore errors from the File::LibMagic describe_filename function.

Newer versions of amavisd-new can make use of the File::LibMagic
library (as opposed to the "file" executable) to get information about
attachments. Using the library should be faster, but when it fails, it
does so in a novel way:

  (02859-21) File::LibMagic::describe_filename failed on p003: libmagic
  JPEG image data, Exif standard: [TIFF image data, big-endian,...

This commit adds such lines to the global ignore list, since they
don't provide us with any useful information.

6 years agoCatch mail that is passed UNCHECKED-ENCRYPTED.
Michael Orlitzky [Wed, 6 Sep 2017 13:19:42 +0000 (09:19 -0400)]
Catch mail that is passed UNCHECKED-ENCRYPTED.

Some encrypted mail can pass through the system with a log line like,

  (01495-17) Passed UNCHECKED-ENCRYPTED {RelayedTaggedInbound}, ...

These were unmatched, because the "-ENCRYPTED" suffix is new. One
regular expression and a dictionary have been updated to catch those
lines and dump them into the "unchecked" bin with the rest of the
UNCHECKED lines.

6 years agoIgnore UTF8SMTP lines.
Michael Orlitzky [Thu, 24 Aug 2017 13:05:04 +0000 (09:05 -0400)]
Ignore UTF8SMTP lines.

Lines that look like,

  UTF8SMTP :10024 /var/...: <sender@example.net> -> <rcpt@example.com>
  BODY=8BITMIME SMTPUTF8 Received: from mx.example.com ([127.0.0.1]) by...

were previously unmatched because of the relatively-new "UTF8SMTP".
Similar lines that have "ESMTP" instead of "UTF8SMTP" are already
ignored, so it makes sense to ignore the "UTF8SMTP" lines too.

6 years agoIgnore amavisd-new "starting child processes" notifications.
Michael Orlitzky [Thu, 24 Aug 2017 12:52:18 +0000 (08:52 -0400)]
Ignore amavisd-new "starting child processes" notifications.

Newer versions of amavisd-new log the following constantly:

  sd_notify (no socket): STATUS=Starting child process(es), ready for work.

It's of no use to us, so add it to the global "ignore" list.

6 years agoFix redundant argument to sprintf warning.
Michael Orlitzky [Thu, 24 Aug 2017 12:20:59 +0000 (08:20 -0400)]
Fix redundant argument to sprintf warning.

Perl 5.22 now warns about redundant (i.e. extra) arguments to the
sprintf function. If your format string only has two place-holders but
you pass three place-fillers, you get warned:

  Redundant argument in sprintf at ./amavis-logwatch line 1338...

The issue there was that the format string passed to sprintf was
constructed dynamically; sometimes it would contain two place-holders,
and sometimes three. Three place-fillers were always passed, so when
only two place-holders were used, the warning would be thrown. This was
fixed by testing whether or not there are two or three place-holders,
and passing the appropriate number of place-fillers.

6 years agoFix unescaped left brace warning in monster regex.
Michael Orlitzky [Thu, 24 Aug 2017 12:16:05 +0000 (08:16 -0400)]
Fix unescaped left brace warning in monster regex.

New versions of Perl are starting to complain about unescaped braces
in regular expressions, and supposedly the warning will become a fatal
error in Perl 5.30. This particular warning is,

  Unescaped left brace in regex is deprecated, passed through in regex;
  marked by <-- HERE in m/^(CLEAN|SPAM(?:MY)?|INFECTED \(.*?\)|BANNED \(.*?\)
  |BAD-HEADER(?:-\d)?|UNCHECKED|MTA-BLOCKED|OVERSIZED|OTHER|TEMPFAIL)(?:
  { <-- HERE [^}]+})?, ([^[]+ )?(?:([^<]+) )?[<(](.*?)[>)] -> ([(<].*?[)>]),
  (?:.*Hits: ([-+.\d]+))(?:.* size: (\d+))?(?:.* autolearn=(\w+))?/ at
  /usr/bin/amavis-logwatch line 2286.

and it was fixed by going to line 2286 and putting a backslash before
the left brace.

6 years agoUpstream source.
Michael Orlitzky [Thu, 24 Aug 2017 11:01:40 +0000 (07:01 -0400)]
Upstream source.