You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by ms...@apache.org on 2004/01/14 00:56:21 UTC
svn commit: rev 6157 - incubator/spamassassin/trunk/spamd
Author: mss
Date: Tue Jan 13 15:56:20 2004
New Revision: 6157
Modified:
incubator/spamassassin/trunk/spamd/spamd.raw
Log:
bug 2900: log also an existing Resent-Message-Id to ease log-analysis.
Modified: incubator/spamassassin/trunk/spamd/spamd.raw
==============================================================================
--- incubator/spamassassin/trunk/spamd/spamd.raw (original)
+++ incubator/spamassassin/trunk/spamd/spamd.raw Tue Jan 13 15:56:20 2004
@@ -702,13 +702,19 @@
my @msglines;
my $actual_length = 0;
my $msgid;
+ my $rmsgid;
while ($_ = $client->getline()) {
if (($actual_length == 0) .. /^$/) { # still in header
- if (/^Message-Id:\s+(.*?)\s*$/i) {
- $msgid = $1;
- while($msgid =~ s/\([^\(\)]*\)//) {}; # remove comments and
- $msgid =~ s/^\s+|\s+$//g; # leading and trailing spaces
- $msgid =~ s/\s.*$//; # keep only the first token
+ if (/^(Resent-)?Message-Id:\s+(.*?)\s*$/i) {
+ my $id = $2;
+ while($id =~ s/\([^\(\)]*\)//) {}; # remove comments and
+ $id =~ s/^\s+|\s+$//g; # leading and trailing spaces
+ $id =~ s/\s.*$//; # keep only the first token
+ unless ($1) {
+ $msgid = $id;
+ } else {
+ $rmsgid = $id;
+ }
}
}
push(@msglines, $_);
@@ -720,7 +726,9 @@
$current_user ||= "(unknown)";
logmsg(
($method eq 'PROCESS' ? "processing" : "checking") .
- " message $msgid for $current_user:$>."
+ " message $msgid" .
+ ($rmsgid ? " ($rmsgid)" : "" ) .
+ " for ${current_user}:$>."
);
my $mail = Mail::SpamAssassin::NoMailAudit->new (