Fixed warn.
[PerlMail.git] / perlmail-accept
index d9a944d..3432acb 100755 (executable)
@@ -566,7 +566,9 @@ my($domain,$full,$timeout)=@_;
                my $code=Mail::Audit::rblcheck($self_faked,$timeout);
                next if !$code;
                # Some 0.0.0.0 etc. found for <linux-kernel@>, see: &Mail::Audit::MAPS::_checkit
-               return $code if $code!='1 Invalid IP address ';
+               # Do not: $code!='1 Invalid IP address '
+               # as it causes warn.
+               return $code if $code ne '1 Invalid IP address ';
                return if !$full;
                }
 }
@@ -600,7 +602,9 @@ my($cmd)=@_;
        my $err=$?;
        $pidcheck && $pidcheck==$pid
                        or do { cluck "waitpid for $cmd returned $pidcheck!=$pid"; return 0; };
-       $status=~s/^stdin: //;
+       $status=~s/^stdin: //mg;
+       # Prevent: LibClamAV Warning: PGP encoded attachment not scanned
+       $status=~s/^.*\bwarning:.*\n//img;
        $status=~s/\n$//;
        return $status if $status ne "OK" && $status;
        return _spamchildcode $err,$status;