CVS Commit mailscanner

Mike Tremaine <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Mark Sapiro wrote:
> Mike,
>
> I posted to the mailscanner list at
> <http://lists.mailscanner.info/pipermail/mailscanner/2009-October/093680.html>
> about a bug in <http://www.stellarcore.net/downloads/mailscanner> and
> also included my changes to the script.
>   
Commited this big old patch.. Thanks Mark!

[mgt@vega services]$ cvs diff mailscanner
Index: mailscanner
===================================================================
RCS file: /var/cvs/logwatch/scripts/services/mailscanner,v
retrieving revision 1.37
diff -r1.37 mailscanner
37c37
< my $mailscanner_phishingthreshold = 
$ENV{'$mailscanner_phishingthreshold'} || 0;
---
 > my $mailscanner_phishingthreshold = 
$ENV{'mailscanner_phishingthreshold'} || 0;
54c54,57
<
---
 > my $SpamAssassin_Rule_Actions = 0;
 > my $MailScan_Deleted_pdb = 0;
 > my $MailScan_Found_pdb = 0;
 > my $MailScan_Spam_Virus = 0;
127c130
<          ( $ThisLine =~ m/Skipping sender of precedence list/ ) or
---
 >          ( $ThisLine =~ m/Skipping sender of precedence list/ ) or
130a134,137
 >          # New processing database
 >          ( $ThisLine =~ m/Connected to [Pp]rocessing(?:-messages| 
Attempts) [Dd]atabase/ ) or
 >          ( $ThisLine =~ m/Found 0 messages in the 
[Pp]rocessing(?:-messages| Attempts) [Dd]atabase/ ) or
 >          ( $ThisLine =~ m/Reading configuration file/ ) or
147a155,157
 >    } elsif ( $ThisLine =~ m/Found spam-virus (\S+) in/i) {
 >       $MailScan_Spam_Virus++;
 >       $Spam_Virus_Found{$1}++;
160c170,171
<    } elsif ($ThisLine =~ m/^\/var\/spool\/MailScanner\/incoming\/.+: 
([\w\_\-\.\/]+) FOUND/i) {
---
 >    } elsif ( ($ThisLine =~ 
m/^\/var\/spool\/MailScanner\/incoming\/.+: ([\w\_\-\.\/]+) FOUND/i) or
 >            ($ThisLine =~ m/Clamd::INFECTED:: (\S+) ::/i) ) {
323a335,342
 >    } elsif ($ThisLine =~ m/SpamAssassin Rule Actions: rule ([^ ]*) 
caused action ([^ ]*) .*in message ([0-9a-f.]*)/i) {
 >       $SpamAssassin_Rule_Actions++;
 >       $SpamAssassin_Rule{$1}++;
 >       $SpamAssassin_Action{$2}++;
 >       $SpamAssassin_Message{$3}++;
 >     } elsif ($ThisLine =~ m/Deleted (\d+) messages from 
processing-database/) {      $MailScan_Deleted_pdb += $1;
 >     } elsif ($ThisLine =~ m/Found (\d+) messages in the 
[Pp]rocessing(?:-messages| Attempts) [Dd]atabase/) {
 >        $MailScan_Found_pdb += $1;
360a380,383
 > #if ($MailScan_Spam_Virus > 0) {
 > #   print "\n\t" . $MailScan_Spam_Virus . ' Spam messages detected by 
Virus signatures';
 > #}
 >
376a400,405
 > if ($MailScan_Deleted_pdb > 0) {
 >    print "\n\t" . $MailScan_Deleted_pdb . " Messages deleted from 
processing-database";
 > }
 > if ($MailScan_Found_pdb > 0) {
 >    print "\n\t" . $MailScan_Found_pdb . " Messages found in 
processing-database";
 > }
465a495,501
 > if (keys %Spam_Virus_Found) {
 >    print "\nSpam Virus Report: (Total Seen = $MailScan_Spam_Virus)\n";
 >    foreach $ThisOne (sort keys %Spam_Virus_Found) {
 >       print '    ' . $ThisOne . ': ' . $Spam_Virus_Found{$ThisOne} . 
" Time(s)\n";
 >    }
 > }
 >
594a631,642
 > if ($SpamAssassin_Rule_Actions > 0) {
 >    print "\nSpamAssassin Rule Actions: (Total Seen = 
$SpamAssassin_Rule_Actions)\n";
 >       foreach $ThisOne (sort keys %SpamAssassin_Rule) {
 >          print '    ' . 'Rule - ' . $ThisOne . ': ' . 
$SpamAssassin_Rule{$ThisOne} . " Time(s)\n";
 >       }
 >       foreach $ThisOne (sort keys %SpamAssassin_Action) {
 >          print '    ' . 'Action - ' . $ThisOne . ': ' . 
$SpamAssassin_Action{$ThisOne} . " Time(s)\n";
 >       }
 >       foreach $ThisOne (sort keys %SpamAssassin_Message) {
 >          print '    ' . 'Message - ' . $ThisOne . ': ' . 
$SpamAssassin_Message{$ThisOne} . " Time(s)\n";
 >       }
 > }
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.