🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #2845

Re: sendmail generates bogus error messages

#2845
From: card carrying aclu member
Date: Mon, 03 Oct 1988 19:18
25 lines
1546 bytes
In article <3153@hermes.ai.mit.edu> wisner@zug.AI.MIT.EDU (Bill Wisner) writes:
>When sending mail to a host that isn't currently reachable, I should
>be seeing error messages like
>  Deferred: Connection timed out during user open with basel.ai.mit.edu
>Instead, I get this:
>  Deferred: Not a typewriter
>I think that somewhere between the time the connection actually times
>out and the time the error message is generated, something happens to
>change errno to ENOTTY. But what? Anyone know how to fix this?

i believe the problem you are seeing is that errno gets clobbered
during a fprintf() call in usersmtp.c.  look in smtpinit() for the
fprintf() call where one of the arguments is errstring(errno) and add
two assignments to save & restore errno before calling fprintf, ala

				r = errno;
  				fprintf(CurEnv->e_xfp,
  					"421 %s.%s... Deferred: %s\n",
  					pvp[1], m->m_name, errstring(errno));
				errno = r;

of course, why errno is getting set to ENOTTY or some other value by
fprintf is in itself an interesting question ...

dsc
Technical Details
Message-ID: <30999@uunet.UU.NET>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!izimbra!dsc
References: <3153@hermes.ai.mit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!izimbra!dsc
From: dsc@izimbra.CSS.GOV (card carrying aclu member)
Newsgroups: comp.mail.sendmail
Subject: Re: sendmail generates bogus error messages
Summary: fprintf clobbers errno in smtpinit()
Keywords: errno fprintf error ENOTTY network host
Message-ID: <30999@uunet.UU.NET>
Date: 3 Oct 88 19:18:06 GMT
References: <3153@hermes.ai.mit.edu>
Sender: news@uunet.UU.NET
Organization: the levi stubbs appreciation society
Lines: 25