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 2004/09/09 02:12:36 UTC
[Bug 3763] New: Empty $opts->{'message'} defaults to GLOB, blocking the service
http://bugzilla.spamassassin.org/show_bug.cgi?id=3763
Summary: Empty $opts->{'message'} defaults to GLOB, blocking the
service
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: All
URL: http://www.ijs.si/software/amavisd/trouble-sa-loop.txt
OS/Version: All
Status: NEW
Severity: major
Priority: P3
Component: Libraries
AssignedTo: dev@spamassassin.apache.org
ReportedBy: Mark.Martinec@ijs.si
With SA 3.0.0-rc3 (and earlier 3.0.0-pre*): the attached URL contains
a sample mail message which blocks SA processing when SA is called
from amavisd-new; mail processing gets stuck until it times out.
The provided sample mail contains an empty attachment of
Content-Type: message/disposition-notification, which triggers
a bug in module Mail/SpamAssassin/Message.pm, subroutine new.
The guilty statement is:
my $message = $opts->{'message'} || \*STDIN;
As the $opts->{'message'} is defined in this case, but contains
an empty string (a false), the $message value defaults to \*STDIN,
which in case of the amavisd-new environment is a socket for
communication with MTA. Few lines further, the statement
@message = <$message>;
tries to read from this socket, and the whole protocol
gets stuck until a timeout occurs, the mail is requeued
for the next attempt which is bound to fail again.
A quick fix is to use:
my $message = defined $opts->{'message'} || \*STDIN;
although I'm not sure what the logic about \*STDIN should
really be.
Regards
Mark
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.