Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix all uses of warn() to be $self->log(LOGWARN, ...)

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@380 958fd67b-6ff1-0310-b445-bb7760255be9
  • Loading branch information...
commit 43aa2072423da8d80c28c780b255b036f2dd1348 1 parent db546fe
Matt Sergeant authored
2  plugins/check_badmailfrom
View
@@ -42,7 +42,7 @@ sub mail_handler {
$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");
}
2  plugins/check_badmailfromto
View
@@ -38,7 +38,7 @@ sub mail_handler {
$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");
2  plugins/require_resolvable_fromhost
View
@@ -43,7 +43,7 @@ sub check_dns {
}
}
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;
8 plugins/spamassassin
View
@@ -138,18 +138,18 @@ sub check_spam {
# 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;
2  plugins/virus/kavscanner
View
@@ -60,7 +60,7 @@ sub register {
$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;
Please sign in to comment.
Something went wrong with that request. Please try again.