Subject: Re: Help with picking out a system
To: None <reynolds@panix.com>
From: Mark P. Gooderum <mark@aggregate.com>
List: current-users
Date: 06/07/1994 10:02:31
> Sun does this by hacking sendmail.  If Sun's sendmail detects that the
> mail spool is on a NFS mounted system it redirects the mail to the NFS
> server instead of doing any local processing.  Not being much of a
> sendmail hacker I don't know if this is a standard sendmail feature (I
> think not) or something Sun added.  Sun doesn't document it.

Ehh, this is slightly wrong as far as I know.  You have to set up sendmail
explicitly to do this by using the sendmail.client.cf file as sendmail.cf.
This is a stripped sendmail.cf that does little more than the initial
rewriting of to and from, handles local uucp, and kicks everything off
to "mailhost".

This still doesn't fix the problem of mail being delivered at the same time
as a different client saving the file after reading it.  We found that this
problem went away by using a Solaris 2 box as the mail host so that 
NFS locking instead of BSDish lockf() was used (on Solaris 2, lockf() just
maps to flock() the whole file).  The mailtool clients already used NFS locking
but you need to make sure that things like elm are built to use fcntl() and
not lockf() locking.  If the client is on a NetBSD host, you're out of luck 
for now.

You also have to make sure that the clients mount the mail dir with the "noac"
option.  This makes sure the clients don't cache any file info from this mount.
For things like NFS clients that don't lock, like NetBSD, this at least 
minimizes the window and avoids other problems (most mail front ends at least
check to see if the file changed from underneath them before writing to it).

But...until the systems gets NFS file locking, you can't reliably read mail on
anything except the delivery machine.  If the delivery machine has NFS locking
then you can do it on any client that also does NFS locking...if your mail
front ends do it.  (Elm can be configured to, Xmailtool runs mail/mailx to
manipulate the mail file...so it depends on mail/mailx).

One other hack (for things like xmailtool) is to patch the mail command to
rsh the command to the mail host...blech but it does work.

-Mark

------------------------------------------------------------------------------