Article View: comp.mail.sendmail
Article #2757Re: Sendmail barfing on long :include: aliases (5.59 on a Sun)
From: Bill Nowicki
Date: Thu, 04 Aug 1988 21:07
Date: Thu, 04 Aug 1988 21:07
84 lines
3395 bytes
3395 bytes
Sigh, I seem to be reminded every few months why I should never
post to Usenet.
In article <5049@zodiac.UUCP>, jordan@zooks.ads.com (Jordan Hayes) writes:
> I'll take it if you can give me source.
Contrary to the rumors flying around, Sun ships its source code as soon
as humanly possible. Sure, from time to time some parts might be
missing from the tape by accident, and it takes some time to do the
testing, documentation, and release of such a huge amount of software.
Anyone who tells you otherwise is lying. Please, no flames about the
AT&T licensing terms! I don't like them either.
Full source to SunOS sendmail is also available through our "Open
Network Computing" package, which includes NFS. About a hundred
vendors and countless Universities have already gotten this software.
So yes, it DOES run on a VAX! All in source code!
By the way, it was pointed out that SunOS 4.0 sendmail is actually
based on the Berkeley 5.54 release, NOT 5.59, so it does have MX
support but does not do the search path for MX records. I should fix
this shortly now that someone brought it to my attention. Generally
I put fixing bugs at a higher priority than adding new features.
> How about a hint as to how you fixed it? :-)
What? Put some information into Usenet instead of just flaming? :-)
The fix is to get rid of the setjmp() call totally, and just save and
restore the timeout variable. It simplifies the code somewhat as well.
------- usersmtp.c -------
16c16
< SCCSID(%Z%%M% %I% %E% SMI (no SMTP)); /* from UCB 5.7 4/2/86 */
---
> SCCSID(@(#)usersmtp.c 1.20 87/09/03 SMI (no SMTP)); /* from UCB 5.7 4/2/86 */
43d42
< #define SMTP_TIMEDOUT 3 /* never got greeting */
62a62,63
> jmp_buf CtxGreeting;
>
70c71
< time_t tempTimeout;
---
> extern greettimeout();
138,141c139,140
< ** This should appear spontaneously. Give it less time to
< ** happen than the normal read timeout since it is more
< ** common, and we have less to lose since we have not started
< ** the SMTP conversation yet.
---
> ** This should appear spontaneously. Give it five minutes to
> ** happen.
143a143,145
> if (setjmp(CtxGreeting) != 0)
> goto tempfail;
> gte = setevent((time_t) 300, greettimeout, 0);
145,146d146
< tempTimeout = ReadTimeout;
< ReadTimeout = (time_t) 120;
148,150c148,149
< ReadTimeout = tempTimeout;
< if (r < 0 || REPLYTYPE(r) != 2) {
< SmtpState = SMTP_TIMEDOUT;
---
> clrevent(gte);
> if (r < 0 || REPLYTYPE(r) != 2)
152d150
< }
227a226,233
> }
>
>
> static
> greettimeout()
> {
> /* timeout reading the greeting message */
> longjmp(CtxGreeting, 1);
Your line numbers may vary. These may not be anybody's official policy.
Bill Nowicki
Sun Microsystems
Technical Details
Message-ID:
<62898@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!decwrl!sun!rose!nowickiReferences:
<5033@zodiac.UUCP> <62267@sun.uucp> <5049@zodiac.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!decwrl!sun!rose!nowicki From: nowicki%rose@Sun.COM (Bill Nowicki) Newsgroups: comp.mail.sendmail Subject: Re: Sendmail barfing on long :include: aliases (5.59 on a Sun) Message-ID: <62898@sun.uucp> Date: 4 Aug 88 21:07:16 GMT References: <5033@zodiac.UUCP> <62267@sun.uucp> <5049@zodiac.UUCP> Sender: news@sun.uucp Distribution: na Lines: 84