Mailing List Archive

[Bug 2887] New: Use of Mail::SpamAssassin::NoMailAudit breaks --log-to-mbox option
http://bugzilla.spamassassin.org/show_bug.cgi?id=2887

Summary: Use of Mail::SpamAssassin::NoMailAudit breaks --log-to-
mbox option
Product: Spamassassin
Version: 2.61
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Libraries
AssignedTo: spamassassin-dev@incubator.apache.org
ReportedBy: aarre@pair.com


I tried to use SpamAssassin 2.61 from a script with the --log-to-mbox option.
When I subsequently attempted to open the mbox file specified with the option,
using "mutt -m mbox -f my.mbox", I received the message "not a mailbox". I
inspected the file. The messages I had piped to SpamAssassin were in the file,
but they were not separated by the required mbox "From_" line. I took a look at
the SpamAssassin source code and found the comment beginning at line 129 that
describes a change from "1. Standard Mail::Audit start" (commented out in the
source) to "2. No use of Mail::Audit", instead using
Mail::SpamAssassin::NoMailAudit (not commented out in the source). On a hunch, I
commented out method #2 and uncommented method #1, then re-ran my script. Voila!
The generated file was a properly formatted mbox, and I was able to open and
read it with mutt.

The comments state that this change was made due to bugs with Mail::Audit, but
it seems that it has introduced a regression error.

A diff showing my exact changes follows:

$ diff spamassassin spamassassin.backup
133,134c133,134
< require Mail::Audit;
< $mail = Mail::Audit->new();
---
> # require Mail::Audit;
> # $mail = Mail::Audit->new();
140,143c140,143
< # use Mail::SpamAssassin::NoMailAudit;
< # if (!$opt{'lint'} && !$doing_address_only_whitelisting) {
< # $mail = Mail::SpamAssassin::NoMailAudit->new ();
< # }
---
> use Mail::SpamAssassin::NoMailAudit;
> if (!$opt{'lint'} && !$doing_address_only_whitelisting) {
> $mail = Mail::SpamAssassin::NoMailAudit->new ();
> }



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.