Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!mimsy!fnord.umiacs.umd.edu!steve From: steve@fnord.umiacs.umd.edu (Steve D. Miller) Newsgroups: comp.unix.ultrix Subject: Re: sendmail 5.64 or higher under Ultrix 4.0? Message-ID: <26430@mimsy.umd.edu> Date: 7 Sep 90 21:08:22 GMT References: <4498@nisca.ircc.ohio-state.edu> Sender: news@mimsy.umd.edu Reply-To: steve@umiacs.umd.edu (Steve D. Miller) Organization: UMIACS, Univ. of Maryland, College Park, MD 20742 Lines: 164 I have sendmail 5.64 up and running on a 5000 running Ultrix 4.0. I don't think I did anything particularly special, though we have enough local hacks in that I could have changed something by accident... I did fix two or three little nits; I've enclosed diffs. There's a problem with leftover timeouts when the read timeout blows its cookies (which may be a localism, I don't remember); also, there's a problem that shows up in debug mode only with passing in an in_addr where a long is expected (or vice versa), and a problem with sending to multiple recipients where a SMTP connection loses midway through the conversation. I also compiled with -g (for no particular reason, it's not like I tried -O and gave up). You might take a peek at the getla() code to see if there isn't some funky load-average-related stuff going on. I have a getla() that works on DECstations, Suns, Encores, and a few other machines; it's not clean, but it functions. If someone wants a copy, holler. -Steve : Run this shell script with "sh" not "csh" PATH=/bin:/usr/bin:/usr/ucb:/etc:$PATH export PATH all=false if [ x$1 = x-a ]; then all=true fi echo Extracting daemon.c.diff sed 's/^X//' <<'//go.sysin dd *' >daemon.c.diff X*** /tmp/daemon.c Fri Sep 7 15:59:23 1990 X--- daemon.c Fri Aug 3 15:30:08 1990 X*************** X*** 380,386 **** X again: X if (tTd(16, 1)) X printf("makeconnection (%s [%s])\n", host, X! inet_ntoa(SendmailAddress.sin_addr.s_addr)); X X s = socket(AF_INET, SOCK_STREAM, 0); X if (s < 0) X--- 380,386 ---- X again: X if (tTd(16, 1)) X printf("makeconnection (%s [%s])\n", host, X! inet_ntoa(SendmailAddress.sin_addr)); X X s = socket(AF_INET, SOCK_STREAM, 0); X if (s < 0) //go.sysin dd * if [ `wc -c < daemon.c.diff` != 494 ]; then made=false echo error transmitting daemon.c.diff -- echo length should be 494, not `wc -c < daemon.c.diff` else made=true fi if $made; then chmod 644 daemon.c.diff echo -n ' '; ls -ld daemon.c.diff fi echo Extracting usersmtp.c.diff sed 's/^X//' <<'//go.sysin dd *' >usersmtp.c.diff X*** /tmp/usersmtp.c Fri Sep 7 16:00:22 1990 X--- usersmtp.c Mon Jul 30 15:45:32 1990 X*************** X*** 74,81 **** X ** creates connection and sends initial protocol. X */ X X- jmp_buf CtxGreeting; X- X smtpinit(m, pvp) X struct mailer *m; X char **pvp; X--- 74,79 ---- X*************** X*** 83,89 **** X register int r; X EVENT *gte; X char buf[MAXNAME]; X! extern greettimeout(); X X /* X ** Open the connection to the mailer. X--- 81,87 ---- X register int r; X EVENT *gte; X char buf[MAXNAME]; X! int oldtimeout; X X /* X ** Open the connection to the mailer. X*************** X*** 135,147 **** X ** happen. X */ X X! if (setjmp(CtxGreeting) != 0) X! goto tempfail; X! gte = setevent((time_t) 300, greettimeout, 0); X SmtpPhase = "greeting wait"; X setproctitle("%s %s: %s", CurEnv->e_id, CurHostName, SmtpPhase); X r = reply(m); X! clrevent(gte); X if (r < 0 || REPLYTYPE(r) != 2) X goto tempfail; X X--- 133,144 ---- X ** happen. X */ X X! oldtimeout = ReadTimeout; X! ReadTimeout = 5 * 60; X SmtpPhase = "greeting wait"; X setproctitle("%s %s: %s", CurEnv->e_id, CurHostName, SmtpPhase); X r = reply(m); X! ReadTimeout = oldtimeout; X if (r < 0 || REPLYTYPE(r) != 2) X goto tempfail; X X*************** X*** 223,234 **** X } X X X- static X- greettimeout() X- { X- /* timeout reading the greeting message */ X- longjmp(CtxGreeting, 1); X- } X /* X ** SMTPRCPT -- designate recipient. X ** X--- 220,225 ---- X*************** X*** 250,255 **** X--- 241,251 ---- X register int r; X extern char *remotename(); X X+ /* if the connection is closed, don't bother */ X+ if (SmtpOut == NULL || SmtpIn == NULL) { X+ errno = EBADF; /* guess */ X+ return(EX_TEMPFAIL); X+ } X smtpmessage("RCPT To:<%s>", m, remotename(to->q_user, m, FALSE, TRUE)); X X SmtpPhase = "RCPT wait"; //go.sysin dd * if [ `wc -c < usersmtp.c.diff` != 1808 ]; then made=false echo error transmitting usersmtp.c.diff -- echo length should be 1808, not `wc -c < usersmtp.c.diff` else made=true fi if $made; then chmod 644 usersmtp.c.diff echo -n ' '; ls -ld usersmtp.c.diff fi -- Spoken: Steve Miller Domain: steve@umiacs.umd.edu UUCP: uunet!mimsy!steve Phone: +1-301-405-6736 USPS: UMIACS, Univ. of Maryland, College Park, MD 20742