🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #123

Bug in ULTRIX 4.2 causes BSMTP problems on IDA-sendmail

#123
From: Peter Pflaeging
Date: Tue, 11 Aug 1992 07:30
72 lines
2421 bytes
ULTRIX 4.2 on DECstations and VAXstations has a problem with
unbuffered input. The commands setbuf and setvbuf don't work correct.

The effect was:

We're running sendmail 5.65c8+ IDA on our site. All mails which are
coming in through BSMTP had an empty line in the middle of their
header.

After browsing through the src I realized, that the only difference
between BSMTP and SMTP is the unbuffered I/O of BSMTP. All our
experiments with various commands don't work.
Except of the full buffered I/O with buffer size of 1.

Our version of sendmail-src has RELEASEDATE 
        Wed Jun 26 10:11:39 CDT 1991
The SCCS Id from main.c says:
        @(#)main.c      5.31 (Berkeley) 7/20/90

Now! Here ist the simple patch for main.c:

*** main.c.orig	Mon Aug 10 13:35:23 1992
--- main.c	Tue Aug 11 09:05:43 1992
***************
*** 64,69 ****
--- 64,73 ----
  static thaw();
  #endif /* __STDC__ */
  
+ #ifdef ultrix
+  static char BsmtpCharBuf; /* One Char Buf for ULTRIX & BSMTP */
+ #endif
+ 
  /*
  **  SENDMAIL -- Post mail to a set of destinations.
  **
***************
*** 889,895 ****
  
  		/* have to run unbuffered or else will lose synchronization */
  		if (batched)
! 			setbuf(InChannel, (char *) NULL);
  		smtp(batched);
  	}
  #endif /* SMTP */
--- 893,903 ----
  
  		/* have to run unbuffered or else will lose synchronization */
  		if (batched)
! #ifdef ultrix
! 			setvbuf(InChannel, (char *) &BsmtpCharBuf , _IOFBF, sizeof(BsmtpCharBuf));
! #else
! 			setbuf(InChannel, (char *) NULL); 
! #endif
  		smtp(batched);
  	}
  #endif /* SMTP */
 

It would be great to hear from other people about this problem

                peter




--
      ____  ____     | eMail: Peter.Pflaeging@magwien.gv.at
     /   / /   /     | pMail: Grabmayrg. 18/6; A-1210 Wien; Austria
    /___/ /___/      | Work : Gemeinde Wien MD-ADV/Ma; Ref. EPS
   /eter /flaeging   | Phone: +43 (1) 387872 or 4039584/22
Technical Details
Message-ID: <PFP.92Aug11093035@marmeladinger.at>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!hp4at!xs0001!news

Show Full Headers
Complete Article Headers
Newsgroups: comp.mail.sendmail,comp.unix.ultrix
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!hp4at!xs0001!news
From: pfp@magwien.gv.at (Peter Pflaeging)
Subject: Bug in ULTRIX 4.2 causes BSMTP problems on IDA-sendmail
Message-ID: <PFP.92Aug11093035@marmeladinger.at>
Lines: 72
Sender: news@xs0001.at (USENET News System)
Nntp-Posting-Host: marmeladinger
Organization: Gemeinde Wien, MD-ADV/Md Ref. EPS
Date: Tue, 11 Aug 1992 07:30:37 GMT