Xref: utzoo comp.protocols.tcp-ip:6871 comp.mail.misc:1812 Path: utzoo!utgpu!attcan!uunet!lll-winken!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!andrew.cmu.edu!cfe+ From: cfe+@andrew.cmu.edu (Craig F. Everhart) Newsgroups: comp.protocols.tcp-ip,comp.mail.misc Subject: Re: smtp problem: remote protocol error: bad file number Message-ID: Date: 21 Apr 89 16:50:57 GMT References: <3074@ursa-major.SPDCC.COM> Organization: Information Technology Center, Carnegie Mellon, Pittsburgh, PA Lines: 17 In-Reply-To: <3074@ursa-major.SPDCC.COM> 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. Craig