Patch for amavis script

Harald Geiger <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Hi,

here is a patch for the amavis script.
This is needed if amavisd is connected by a remote host.

Regards,
  Harald

-- 
Harald Geiger                                     Phone: +49-8102-895190
Email: mailto:[email protected]                    Fax: +49-8102-895199
PGP/GPG:           http://www.aerasec.de/wir/publickeys/HaraldGeiger.asc

AERAsec Network Services and Security GmbH         http://www.aerasec.de
Wagenberger Straße 1                                 HRB: 133265 MÃŒnchen
D-85662 Hohenbrunn                     GeschÀftsfÌhrer: Dr. Matthias Leu
                                        Sitz der Gesellschaft: Hohenbrunn

_______________________________________________
Logwatch-Devel mailing list
[email protected]
http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
amavis.patch (text/plain, 1 KB)
--- /usr/share/logwatch/scripts/services/amavis	2007-05-20 02:24:33.000000000 +0200
+++ amavis	2008-01-24 12:25:11.000000000 +0100
@@ -558,8 +558,9 @@
       }
       $Totals{"CleanMsg$action"}++;
 
-   } elsif (my ($size) = ($p1 =~ /^LMTP::\d+ .* SIZE=(\d+) / )) {
+   } elsif (my ($size) = ($p1 =~ /^LMTP:(?:\[$re_IP])?:\d+ .* SIZE=(\d+) / )) {
         # LMTP::10024 /var/spool/amavis/tmp/amavis-20070119T144757-09086: <[email protected]> -> <[email protected]> SIZE=131730 Received: from mail.sample.net ([127.0.0.1]) by localhost (mail.sample.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP for <[email protected]>; Fri, 19 Jan 2007 15:41:45 -0800 (PST)
+        # LMTP:[10.0.0.1]:10024 /var/spool/amavis/tmp/amavis-20070601T171120-30408: <[email protected]> -> <[email protected]> SIZE=13730 Received: from mail.sample.net ([127.0.0.1]) by localhost (mail.sample.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP for <[email protected]>; Fri,  1 Jun 2007 17:11:20 +0200 (CEST)
         $Totals{'BytesScanned'} += $size;
 
    # SpamPassed, SpamBlocked
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.