Fix detection of spam via X-Spam-Status header
authorJamie Cameron <jcameron@webmin.com>
Thu, 14 Apr 2011 21:20:52 +0000 (14:20 -0700)
committerJamie Cameron <jcameron@webmin.com>
Thu, 14 Apr 2011 21:20:52 +0000 (14:20 -0700)
http://www.virtualmin.com/node/17856

sendmail/autoreply.pl

index 2e34162..5097b86 100755 (executable)
@@ -89,8 +89,8 @@ if ($spam) {
        $isspam = undef;
        open(SPAMOUT, $temp);
        while(<SPAMOUT>) {
-               if (/^X-Spam-Status:\s+(\S+)/i) {
-                       $isspam = lc($1) eq 'yes' ? 1 : 0;
+               if (/^X-Spam-Status:\s+Yes/i) {
+                       $isspam = 1;
                        last;
                        }
                last if (!/\S/);