http://bugzilla.spamassassin.org/show_bug.cgi?id=3664
Summary: different results from invoking mass-check with -file
and -mbox on the attached message
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Plugins
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
Hi, I wrote a trivial plugin which would output the md5 of a message. The code
is as follows
sub print_md5 {
my ($self, $permsgstatus) = @_ ;
my $msgid = "" ;
my $ma = $permsgstatus->get_message();
$msgid = $ma->get_header("message-id");
if (!$msgid) {
print "Message has undefined message id\n" ;
return 0 ;
}
chomp($msgid);
if ($msgid =~ /spamd_init/) {
print STDERR "Message Id is $msgid \n";
return 0 ;
}
$md5 = Digest::MD5->new;
$msgref = $permsgstatus->get_message();
$msg = $msgref->get_pristine();
$mboxsep = $msgref->get_mbox_separator();
$md5->add($mboxsep,$msg);
$digest = $md5->hexdigest;
print STDERR "$digest \n" ;
}
I invoked this plugin via mass-check on the attached message via the following
command line
mass-check -c /some/path -p /some/path --all --mid --mbox /path/to/mesg > output
cat output
:13 UTC 2004
# M:SA version 3.0.0-pre3-r31067
# SVN revision: unknown
# Perl version: 5.008003 on i386-linux-thread-multi
. 1 /home/yusufg/bug3.0 MY_PLUGIN_FOO time=1091591626,mid=<20040703140858.7922.
[EMAIL PROTECTED]>,scantime=0
Message has undefined message id
. 0 /home/yusufg/bug3.2290 time=1091613613,mid=<[EMAIL PROTECTED]
r.arpa.masses.spamassassin.org>,scantime=0
now if I invoke mass-check on the same message and change the target to --file,
I get
# mass-check results from [EMAIL PROTECTED], on Wed Aug 4 10:03
:37 UTC 2004
# M:SA version 3.0.0-pre3-r31067
# SVN revision: unknown
# Perl version: 5.008003 on i386-linux-thread-multi
. 1 /home/yusufg/bug3 MY_PLUGIN_FOO time=1091591626,mid=<20040703140858.7922.qm
[EMAIL PROTECTED]>,scantime=0
I can't figure out what in this message is generating the undefined return from
get_header("message-id") and why mass-check --mbox is thinking there are 2
messages in this file.
FWIW, mutt opens the file correctly
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.