Anyone know what this means?

Miguel Koren O'Brien de Lacy miguelk at KONSULTEX.COM.BR
Fri Aug 22 20:56:06 IST 2003


Mike;

I did a search no deja (google) of "smtp Bad file number" and this is
the most reasonable comment I found:

You're seeing a misleading error message.  ``bad file number'' is a
representation of what was left in errno (EBADF) after an SMTP connection went
south; the connection is closed, but sendmail doesn't know it, so it does a
``close()'' anyway, leaving bad stuff in the global variable ``errno''.  An
ostensible fix for this was posted to comp.mail.sendmail about a month ago,
involving saving and restoring the errno value across a pair of close()
operations.

Unfortunately, that errno-clobber is masking the original errno value, which is
doubtless something like ETIMEDOUT or ECONNREFUSED.  Too bad your error-handler
is interpreting the EBADF as a permanent/persistent error rather than a
transient one.

Once you find out what the network problem is, you'll have to deal with your
network/gateway support to find out why you can't get to some hosts.

Actually, sendmail always prints the error message for the current
value of errno when it prints any error.  The "bad file number" was
probably the errno value sitting around when the "protocol error"
occured.

If you are surprised, then re-check the intro message to your UNIX C
Library.  "errno" is not garunteed to be zero when an error hasn't
occured...

It's from 1989 though...

Miguel

Mike Kercher wrote:

>----- Transcript of session follows -----
>221 2.0.0 genesis.camaross.net closing connection <user at tld.com>... Deferred:
>Bad file number
>Warning: message still undelivered after 4 hours
>
>Bad file number?
>
>Mike
>
>



More information about the MailScanner mailing list