Package: amavisd-new
Version: 1:2.7.1-2

Package: spamassassin
Version: 3.3.2-5+deb7u1

If a mail with image attachment[0] is sent I get '(!!)SA failed: error closing 
input file: Bad file descriptor at 
/usr/share/perl5/Mail/SpamAssassin/Message.pm line 569, <GEN35> line 183. at 
(eval 113) line 759, <GEN35> line 183.' in syslog,
worse, if the error occurs, the mail is rated as not being spam.
The trigger seems to be the Content-Type: header of the attachment. If set to 
"image/jpg" "image/gif" "image/png" the error occurs, if set to "text/plain" or 
"text/html" it's gone.
I just upgraded from squeeze which showed the same effect. Running "spamc" or 
"spamassassin -t" does not produce this error.

/var/log/mail.log:
        Oct 19 06:43:17 amavis amavis[9649]: (09649-06) (!!)SA failed: error 
closing input file: Bad file descriptor at 
/usr/share/perl5/Mail/SpamAssassin/Message.pm line 567, <GEN28> line 3846.

[0] Sample Mail:
-- snip ---
Message-ID: <6164D2818A5E71429E9BD26F8B04C9B9@qxzihm>
From: <[email protected]>
To: <[email protected]>
Subject: this subject
Date: Mon, 27 Oct 2014 12:06:00 +0300
MIME-Version: 1.0
Content-Type: multipart/related;
        type="multipart/alternative";
        boundary="BB"
 
--BB
Content-Type: image/gif;
        name="jjsv.gif"
Content-Transfer-Encoding: base64
 
R0lGODdhzwKYA3cAACwAAAAAzwKYA4cAAACAAAAAgACAgAAAAICAAIAAgIDAwMDA3MCmyvAAAAAw
8YaMGjp0Q86dFc5OLPouada/gQcXPpx4cePHkSdXvpx5c+cpAwIAOw==
 
 
--BB--
--- snap ---

I feed it to swaks(1) for delivery to the mail server.
I also tried debugging options on with
/etc/amavis/conf.d/000-local:
$sa_debug = 1; # Enable SpamAssassin debugging
$log_level = 5; # (defaults to 0)
this leads to extensive output /without/ the initial error message concerning 
the file handle (this might be an indicator to a race condition, maybe)
 
If I take a look at the code as indicated by the error message, I'm quite not 
sure what would be the point of aborting
after an unsuccessful close() here.

-- 
LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart
Fon: +49 (7 11) 78 28 50 90 - Fax:  +49 (7 11) 78 28 50 91
Mail: [email protected] - Web: http://lihas.de
Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to