Newsgroups: comp.sys.sgi
Path: utzoo!censor!geac!alias!mark
From: mark@alias.uucp (Mark Andrews)
Subject: Re: Why was mail_bsd(1) changed?
Message-ID: <1991Feb4.175108.9761@alias.uucp>
Reply-To: mark@alias.UUCP (Mark Andrews)
Organization: Alias Research Inc., Toronto, Canada
References: <1991Jan24.185356.13375@alias.uucp> <83600@sgi.sgi.com>
Distribution: na
Date: Mon, 4 Feb 91 17:51:08 GMT

In article <83600@sgi.sgi.com> vjs@rhyolite.wpd.sgi.com (Vernon Schryver) writes:
	<Stuff deleted>

>In these days of high SGI-BSD compatibility, porting the 4.3BSD Mail
>from the tape or uunet should be trivial, should you want to change it
>back.
>
>
>Vernon Schryver,  vjs@sgi.com
>Disclaimer: I was not a disinterested observer of this change to Mail.

I agree you about the porting except for a few points. The SGI version of
BSD mail has a few differences from the "true" 4.3BSD mail. As it says in
the mail_bsd(1) man page, the following files are created"

	FILE			Reason
	----			------

     /usr/mail/user.lock      Lock for user's mailbox.
     /usr/mail/user.rolock    Read-only lock for user's mailbox.
                              Used to prevent file contention between multiple
                              Mail instances.

Under what circumstances are these files created by mail_bsd(1)?

I suspect that the `user.lock' file is only created by the mail program which
delivers the mail to a users mailbox. Does SGI's version of mail_bsd(1) care
about the existence of this file? I know from prior releases that if
/usr/mail/user.lock existed when that user logged in, their login session would
be locked until the user.lock file was removed (i.e.: the `/bin/mail -e' test
in /etc/cshrc). I seem to remember reading about something in the IRIX 3.3
or 3.3.1 release notes that SGI had fixed this problem, but I don't remember.
What should mail_bsd(1) do if it encounters a user.lock file?

The purpose of the user.rolock is probably exactly as it looks. When you enter
mail_bsd(1), the rolock file is created, thus making the users mail file
read-only. As long as /usr/mail/user.rolock exists, the file may not be
modified. If an attempt is made to modify the mail file (i.e.: concurrent mail
sessions), the program should warn the user that the file may not be modified
at this time.

There is also the point that mail_bsd(1) is setgid mail, while BSD mail was
not.

While I could get the BSD mail compiled okay on the SGI machines, I would be
worried about any important changes that I have overlooked during the port
that may be important to SGI's implementation of the mail program.

I appreciate the explanation. I guess I will have to get used to ra.

------------------------------------------------------------------------------
	Mark Andrews
	Systems Programmer,
	Alias Research,
	Toronto, Canada
Phone:	(416)-362-9181
Mail box: mark%alias@csri.utoronto.ca
-- 
------------------------------------------------------------------------------
	Mark Andrews
	Systems Programmer,
	Alias Research,
