[net.unix] sendmail

bader@b.psy.cmu.edu (miles bader) (11/03/85)

The sendmail I have has an annoying habit of give the message
 Cannot open /dev/console: Bad file number
every single time it's run.  It's not really a big deal, since it
doesn't seem to affect anything, but it is annoying, and it screws
up emacs smail.

It also seems rather strange, as EBADF is not one of the errors
that open() can die on...

Any explanations???
				-Miles, bader@a.psy.cmu.edu

eugene@ames.UUCP (Eugene Miya) (11/03/85)

I observe that sendmail (including the 4.3 version) is taking on
the appearance of Multics/PL/1.  Will a "Ken" please step forward?

From the Rock of Ages Home for Retired Hackers:
--eugene miya
  NASA Ames Research Center
  {hplabs,ihnp4,dual,hao,decwrl,allegra}!ames!aurora!eugene
  eugene@ames-nas.ARPA

barry@adelie.UUCP (Barry A. Burke) (11/05/85)

> The sendmail I have has an annoying habit of give the message
>  Cannot open /dev/console: Bad file number
> every single time it's run.  It's not really a big deal, since it
> doesn't seem to affect anything, but it is annoying, and it screws
> up emacs smail.
>
> Any explanations???

check your system's /etc/hosts file.  If the administrator followed the
installation instructions he changed the line:

	127.1	localhost

to

	127.1	<real host name>

Sendmail as delivered on most binary-only licenses connects to syslog(8) 
using the hostname of `localhost' specifically on the connection request[*].
Change it back to `localhost' and everything should work again...

[*] this is my personal assumption, since I can't look at the sources.  I
    know in fact that this will cause the problem specified, and the prescribed
    action will correct it.  Apologies to the unix wizards out there if not
    100% accurate.

-- 
LIVE:	Barry A. Burke, (617) 965-8480 x26
USPS:	Adelie Corporation, 288 Walnut St., Newtonville, MA  02160
UUCP:	..!{harvard | decvax!linus!axiom}!adelie!barry
ARPA:	adelie!barry@harvard.ARPA

jsdy@hadron.UUCP (Joseph S. D. Yao) (11/17/85)

In article <2743@brl-tgr.ARPA> bader@b.psy.cmu.edu (miles bader) writes:
>The sendmail I have has an annoying habit of give the message
> Cannot open /dev/console: Bad file number

The Ultrix 1.1 (and prob'ly 1.0) distribution does this.  The first
reason is that the syslog.c subroutine is compiled -DEBUG, for no
apparent reason; this inhibits opening /dev/console if one cannot
find localhost in /etc/hosts.  However, you don't need source code
to fix this.  Go put back into /etc/hosts the line that was originally
there -- I think:
	127.1	localhost myname
replacing "myname" with your local name.  Then make sure your real
hosts line is above this line.  (Best performance from sendmail
comes from making these ll 2 and 1 respectively in /etc/hosts.)
Also, in /etc/networks, put:
	127	loopback	loop
PLEASE check the Ultrix Installation Manual, as I am not sure these
are absolutely correct.

To make sure these changes are propagated the next time your netadmin
user updates the /etc/hosts, put the 2 lines in /etc/hosts.local and
the 1 line in /etc/networks.local.  Again, check me with the UIM.
-- 

	Joe Yao		hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}