cvs commit: qpsmtpd/plugins/virus kavscanner

[email protected] (Matt Sergeant) 3 Mar 2005 02:37:04 -0000
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     05/03/02 18:37:04

  Modified:    plugins  check_badmailfrom check_badmailfromto
                        require_resolvable_fromhost spamassassin
               plugins/virus kavscanner
  Log:
  Fix all uses of warn() to be $self->log(LOGWARN, ...)
  
  Revision  Changes    Path
  1.8       +1 -1      qpsmtpd/plugins/check_badmailfrom
  
  Index: check_badmailfrom
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/check_badmailfrom,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- check_badmailfrom	28 Jan 2005 03:30:50 -0000	1.7
  +++ check_badmailfrom	3 Mar 2005 02:37:04 -0000	1.8
  @@ -42,7 +42,7 @@
       $bad =~ s/^\s*(\S+).*/$1/;
       next unless $bad;
       $bad = lc $bad;
  -    warn "Bad badmailfrom config: No \@ sign in $bad\n" and next unless $bad =~ m/\@/;
  +    $self->log(LOGWARN, "Bad badmailfrom config: No \@ sign in $bad") and next unless $bad =~ m/\@/;
       $transaction->notes('badmailfrom', "sorry, your envelope sender is in my badmailfrom list")
         if ($bad eq $from) || (substr($bad,0,1) eq '@' && $bad eq "\@$host");
     }
  
  
  
  1.2       +1 -1      qpsmtpd/plugins/check_badmailfromto
  
  Index: check_badmailfromto
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/check_badmailfromto,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- check_badmailfromto	28 Jan 2005 03:30:50 -0000	1.1
  +++ check_badmailfromto	3 Mar 2005 02:37:04 -0000	1.2
  @@ -38,7 +38,7 @@
       $bad =~ s/^\s*(\S+).*/$1/;
       next unless $bad;
       $bad = lc $bad;
  -    warn "Bad badmailfromto config: No \@ sign in $bad\n" and next unless $bad =~ m/\@/;
  +    $self->log(LOGWARN, "Bad badmailfromto config: No \@ sign in $bad") and next unless $bad =~ m/\@/;
       $transaction->notes('badmailfromto', "$bad")
         if ($bad eq $from)
         || (substr($bad,0,1) eq '@' && $bad eq "\@$host");
  
  
  
  1.5       +1 -1      qpsmtpd/plugins/require_resolvable_fromhost
  
  Index: require_resolvable_fromhost
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/require_resolvable_fromhost,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- require_resolvable_fromhost	28 Jan 2005 03:30:50 -0000	1.4
  +++ require_resolvable_fromhost	3 Mar 2005 02:37:04 -0000	1.5
  @@ -43,7 +43,7 @@
       }
     }
     else {
  -    warn "$$ query for $host failed: ", $res->errorstring, "\n"
  +    $self->log(LOGWARN, "$$ query for $host failed: ", $res->errorstring)
         unless $res->errorstring eq "NXDOMAIN";
     }
     return 0;
  
  
  
  1.16      +4 -4      qpsmtpd/plugins/spamassassin
  
  Index: spamassassin
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/spamassassin,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- spamassassin	27 Nov 2004 07:02:23 -0000	1.15
  +++ spamassassin	3 Mar 2005 02:37:04 -0000	1.16
  @@ -138,18 +138,18 @@
     # or CHECK or REPORT or SYMBOLS
   
     print SPAMD "X-Envelope-From: ", $transaction->sender->format, CRLF
  -    or warn "Could not print to spamd: $!";
  +    or $self->log(LOGWARN, "Could not print to spamd: $!");
   
     print SPAMD join CRLF, split /\n/, $transaction->header->as_string
  -    or warn "Could not print to spamd: $!";
  +    or $self->log(LOGWARN, "Could not print to spamd: $!");
   
     print SPAMD CRLF
  -    or warn "Could not print to spamd: $!";
  +    or $self->log(LOGWARN, "Could not print to spamd: $!");
   
     while (my $line = $transaction->body_getline) {
       chomp $line;
       print SPAMD $line, CRLF
  -      or warn "Could not print to spamd: $!";
  +      or $self->log(LOGWARN, "Could not print to spamd: $!");
     }
   
     print SPAMD CRLF;
  
  
  
  1.2       +1 -1      qpsmtpd/plugins/virus/kavscanner
  
  Index: kavscanner
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/virus/kavscanner,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- kavscanner	30 Jun 2004 09:25:07 -0000	1.1
  +++ kavscanner	3 Mar 2005 02:37:04 -0000	1.2
  @@ -60,7 +60,7 @@
     $self->register_hook("data_post", "kav_scan");
   
     if (@args % 2) {
  -    warn "kavscanner: Wrong number of arguments";
  +    $self->log(LOGWARN, "kavscanner: Wrong number of arguments");
       $self->{_kavscanner_bin} = "/opt/AVP/kavscanner";
     } else {
       my %args = @args;