Bug#352644: exim4-daemon-heavy: calls local_scan() with
O_WRONLY|O_APPEND fd causing EBADF in read()
Marek Michalkiewicz
marekm at amelek.gda.pl
Mon Feb 13 08:18:04 UTC 2006
Package: exim4-daemon-heavy
Version: 4.50-8
Severity: normal
I'm using sa-exim 4.2-2, which works most of the time, but some of
the incoming messages cause the following errors to be logged:
SA: PANIC: Unexpected error on read body (but message was accepted), file sa-exim.c, line 984: Bad file descriptor
SA: PANIC: Error in error handler while trying to save mail to /var/spool/sa-exim/SAerrorsave/1139565396_1F7V12-0006Gd-Gg, file sa-exim.c, line 1470: Bad file descriptor
With the help of some changes in sa-exim.c local_scan() function
(logging the fcntl(fd, F_GETFL, 0) return value), I discovered that
when it works, the file descriptor passed by Exim has O_RDWR flags,
and when it doesn't, the flags are O_WRONLY|O_APPEND and read()
fails with EBADF (fd is open, but not for reading).
Exim documentation - spec.txt 41.2 API for local_scan() - says
"The file is open for reading and writing". Sometimes this is not
the case, sa-exim fails, and messages are accepted without checking.
Thanks,
Marek
-- Package-specific info:
Exim version 4.50 #1 built 27-May-2005 08:10:05
Copyright (c) University of Cambridge 2004
Berkeley DB: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
Support for: iconv() IPv6 PAM Perl GnuTLS Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Configuration file is /var/lib/exim4/config.autogenerated
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.30
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Versions of packages exim4-daemon-heavy depends on:
ii exim4-base 4.50-8 support files for all exim MTA (v4
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libdb4.2 4.2.52-18 Berkeley v4.2 Database Libraries [
ii libgnutls11 1.0.16-13.1sarge1 GNU TLS library - runtime library
ii libldap2 2.1.30-8 OpenLDAP libraries
ii libmysqlclient12 4.0.24-10sarge1 mysql database client library
ii libpam0g 0.76-22 Pluggable Authentication Modules l
ii libpcre3 4.5-1.2sarge1 Perl 5 Compatible Regular Expressi
ii libperl5.8 5.8.4-8sarge3 Shared Perl library
ii libpq3 7.4.7-6sarge1 PostgreSQL C client library
ii libsasl2 2.1.19-1.5 Authentication abstraction library
-- no debconf information
More information about the Pkg-exim4-maintainers
mailing list