~ubuntu-branches/ubuntu/vivid/mailscanner/vivid

« back to all changes in this revision

Viewing changes to lib/MailScanner/RBLs.pm

  • Committer: Bazaar Package Importer
  • Author(s): Simon Walter
  • Date: 2008-04-03 21:32:08 UTC
  • mfrom: (1.1.7 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080403213208-97amip59j1i11rac
Tags: 4.68.8-1
* New upstream release
* Removed unused templates (Closes: #472676, #472067, #469916)
* Fix broken non-standard conform init-script, which caused upgrade problems
  invoke-rc.d requires initscripts to return 0 if the daemon was already 
  stopped (Closes: #472489)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#   MailScanner - SMTP E-Mail Virus Scanner
3
3
#   Copyright (C) 2002  Julian Field
4
4
#
5
 
#   $Id: RBLs.pm 3638 2006-06-17 20:28:07Z sysjkf $
 
5
#   $Id: RBLs.pm 4198 2007-10-17 08:53:24Z sysjkf $
6
6
#
7
7
#   This program is free software; you can redistribute it and/or modify
8
8
#   it under the terms of the GNU General Public License as published by
41
41
use vars qw($VERSION);
42
42
 
43
43
### The package version, both in 1.23 style *and* usable by MakeMaker:
44
 
$VERSION = substr q$Revision: 3638 $, 10;
 
44
$VERSION = substr q$Revision: 4198 $, 10;
45
45
 
46
46
#my %spamlistfailures; # Number of consecutive failures for both lists
47
47
 
148
148
                                MailScanner::Config::SpamLists($SpamName));
149
149
      if ($RBLEntry) {
150
150
        $RBLEntry = Socket::inet_ntoa($RBLEntry);
151
 
        if ($RBLEntry =~ /^127\.[01]\.0\.[123456789]\d*$/) {
 
151
        if ($RBLEntry =~ /^127\.[01]\.[0-9]\.[123456789]\d*$/) {
152
152
          # Got a hit!
153
153
          $IsSpam = 1;
154
154
          print $pipe "Hit\n";
285
285
  # JKF 3/10/2005
286
286
  my $temp = @HitList;
287
287
  $temp = $temp + 0;
 
288
  $temp = 0 unless $HitList[0] =~ /[a-z]/i;
288
289
  return ($temp, join(', ', @HitList));
289
290
}
290
291