You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/01/26 14:39:46 UTC
[Bug 4108] New: Missing Mail::SpamAssassin leads to mail corruption
http://bugzilla.spamassassin.org/show_bug.cgi?id=4108
Summary: Missing Mail::SpamAssassin leads to mail corruption
Product: Spamassassin
Version: 3.0.2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: spamassassin
AssignedTo: dev@spamassassin.apache.org
ReportedBy: spamassassin@chrisdolan.net
If the "spamassassin" executable is installed, but the Mail::SpamAssassin libs
are not, the resulting crash may lead to mail corruption in procmail
installations. This is a rare case, but it is (fairly) easy to work around.
Steps to reproduce (a little too specific, but I hope you get the point):
1) Install Mail::SpamAssassin under Perl 5.6.1
(i.e. Mail::SpamAssassin goes in /usr/lib/perl5/site_perl/5.6.1)
2) add
:0fw
| /usr/bin/spamassassin
to ~/.procmailrc
3) upgrade Perl to 5.8.6, including /usr/bin/perl
Actual results:
/usr/bin/spamassassin crashes because Mail::SpamAssassin can't be found in
/usr/lib/perl5/site_perl/5.8.6, mail gets corrupted
Expected results:
/usr/bin/spamassassin detects a failure and returns the unaltered email
Proposed fix:
Wrap the body of /usr/bin/spamassassin in something like the following (with
appropriate handling if STDIN has already been read):
eval {
use Mail::SpamAssassin;
...
}
if ($@) {
print <STDIN>;
}
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4108] Missing Mail::SpamAssassin leads to mail corruption
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4108
------- Additional Comments From felicity@kluge.net 2005-01-27 07:50 -------
I think I would more expect procmail to find that the filter returns an error
code, and treats the filter run as a no-op.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4108] Missing Mail::SpamAssassin leads to mail corruption
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4108
------- Additional Comments From spamassassin@chrisdolan.net 2005-01-27 07:59 -------
Theo,
I would think so too, but experience shows otherwise. While SA was crashing,
the leading "F" in each message was truncated, yielding mbox messages starting
with, for example:
rom apache@bugzilla.spamassassin.org Thu Jan 27 09:51:16 2005
Return-Path: <ap...@bugzilla.spamassassin.org>
...
instead of:
From apache@bugzilla.spamassassin.org Thu Jan 27 09:51:16 2005
Return-Path: <ap...@bugzilla.spamassassin.org>
...
As soon as we installed M::SA under 5.8.6, the corruption ceased.
Perhaps my mail server is misconfigured and thus at fault, but it still seems
that my proposed workaround is appropriate for graceful failures of the SA
executable.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4108] Missing Mail::SpamAssassin leads to mail corruption
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4108
------- Additional Comments From parkerm@pobox.com 2005-01-27 08:22 -------
Subject: Re: Missing Mail::SpamAssassin leads to mail corruption
> I would think so too, but experience shows otherwise. While SA was crashing,
> the leading "F" in each message was truncated, yielding mbox messages starting
> with, for example:
>
> rom apache@bugzilla.spamassassin.org Thu Jan 27 09:51:16 2005
> Return-Path: <ap...@bugzilla.spamassassin.org>
> ...
Isn't this a known procmail bug?
http://wiki.apache.org/spamassassin/UsedViaProcmail
Contains an example that works around this bug.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4108] Missing Mail::SpamAssassin leads to mail corruption
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4108
------- Additional Comments From felicity@kluge.net 2005-01-27 08:14 -------
Subject: Re: Missing Mail::SpamAssassin leads to mail corruption
On Thu, Jan 27, 2005 at 07:59:55AM -0800, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> I would think so too, but experience shows otherwise. While SA was crashing,
> the leading "F" in each message was truncated, yielding mbox messages starting
> with, for example:
Yeah, that's a known bug in procmail. IIRC, versions up to 3.21 do this
(you'd have to Google around for details). We even document this issue
in the SA sample procmailrc:
# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped. This will re-add it.
# NOTE: This is probably NOT needed in recent versions of procmail
:0
* ^^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
| sed -e '1s/^/F/'
}
BTW, according to the procmail documentation:
w Wait for the filter or program to finish and check its exitcode
(normally ignored); if the filter is unsuccessful, then the text
will not have been filtered.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4108] Missing Mail::SpamAssassin leads to mail corruption
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4108
spamassassin@chrisdolan.net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
------- Additional Comments From spamassassin@chrisdolan.net 2005-01-27 09:25 -------
OK, thanks for the info! Sorry for not finding the FAQ answer myself.
Closing as "WONTFIX"
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.