Subject: | MIME::Parser: can't seek: Bad file descriptor at /usr/share/perl5/MIME/Parser.pm line 790 |
I am having a problem with MIME::Parser in conjunction with the Parts filter module of Courier::Filter 0.13 <http://search.cpan.org/dist/Courier-Filter> (written by me). The Parts filter module sets up MIME::Parser like this:
my $mime_parser = MIME::Parser->new();
$mime_parser->output_under(File::Spec->tmpdir);
$mime_parser->use_inner_files(TRUE);
When the module finally calls $mime_parser->parse_open(), the call fails with the following error message:
MIME::Parser: can't seek: Bad file descriptor at /usr/share/perl5/MIME/Parser.pm line 790
The file handle on which MIME::Parser tries to perform a seek() is a MIME::Parser::InnerFile object. So this is definitely a bug in MIME::Parser (or MIME::Parser::InnerFile).
This causes my mail filter to die on any MIME multipart messages, so I'll have to downgrade libmime-perl.
See also the related Debian bug report #277318 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=277318>