[comp.unix.aix] AIX 1.2 for PS/2, SendMail/NFS problems

amr@dukee.egr.duke.edu (Anthony M. Richardson) (07/20/90)

I've had AIX 1.2 installed for about a week.  It's really nice, with a
lot of nice extensions to 1.1.

Here's one problem which I would like to get fixed and am appealing to
the net for help.

I mount a particular directory on another machine over a user directory
ala,

   mount bigdisk:/home/disk0/amr /u/amr

Everything seems to work fine after that except for mail.  If I just 
type "mail" the program hangs.  Also, after a while, the load on
my machine shoots way up and I notice that several "sendmail" and
"bellmail" programs have started up. (This was after I sent mail
to myself on my machine from another machine.  The file .newmail
is created but nothing is in it.)  I suspect the problem might
be do to a problem in SendMail/bellmail with reading/writing to
$HOME/.newmail when $HOME is mounted over the network.

Can anyone suggest a fix to the problem?  I've thought of the following.

(1) Just mount bigdisk:/home/disk0/amr over a subdirectory in /u/amr.
This works (I think because /u/amr/.newmail is now a local file), but
is not what I consider a "clean" solution.  I really like to
logon to the various machines we have here and have the same
directory structure.

(2) Change something in sendmail.cf so that my mail gets written to
/usr/spool/mail/amr (or something) instead of $HOME/.newmail.
This is an acceptable solution, but I have no idea what to change
in sendmail.cf to accomplish this.

Any help would be greatly appreciated.
I read this group, so post answers if you think it is of general interest,
but I would also appreciate email replies.

Tony Richardson     amr@dukee.egr.duke.edu

   hoping soon this (^^^^^^^^^^^^^^^^^^^^^) will be amr@minnow.egr.duke.edu :-)

jackv@turnkey.tcc.com (Jack F. Vogel) (07/22/90)

In article <1012@cameron.egr.duke.edu> amr@dukee.egr.duke.edu (Anthony M. Richardson) writes:
>I've had AIX 1.2 installed for about a week.  It's really nice, with a
>lot of nice extensions to 1.1.
 
>Here's one problem which I would like to get fixed and am appealing to
>the net for help.
 
[ ... description of having HOME directory NFS mounted deleted...]

>... I suspect the problem might
>be do to a problem in SendMail/bellmail with reading/writing to
>$HOME/.newmail when $HOME is mounted over the network.
 
I can't cite exact APAR numbers but I know there were various NFS problems
in the base GA 1.2 system that have been fixed in service, I am not sure
if this problem would be fixed by them but I am quite sure that as you
suspect it is an NFS problem. I would suggest that you call IBM support,
describe the problem and ask for any service fixes that relate to NFS.

>Can anyone suggest a fix to the problem?  I've thought of the following...
 
>(2) Change something in sendmail.cf so that my mail gets written to
>/usr/spool/mail/amr (or something) instead of $HOME/.newmail.
>This is an acceptable solution, but I have no idea what to change
>in sendmail.cf to accomplish this.
 
Well, you are close but not quite right on. Sendmail does not take care
of local delivery so it doesn't know anything about your mailbox. What
does is the program bellmail, it is written to deliver to $HOME/.newmail.
Unfortunately, there is no way that I know of to change this specific
behavior, however there is a relatively simple solution to your problem.
Simply create a .forward file in your home directory with the absolute
path of the file you wish mail delivered to (something not NFS mounted,
like /usr/mail/tony) and that should eliminate the problem. Oh yes, I
would not suggest using /usr/spool/mail due to the fact that /usr/spool
is a symlink to <LOCAL>/spool and thus would be a different directory
depending which machine in the TCF cluster you are logged into. Of course
if you aren't using TCF then this won't matter.

Hope this helps you out.

Disclaimer: Me speak for LCC, much less IBM, you must be kidding :-}!

-- 
Jack F. Vogel			jackv@locus.com
AIX370 Technical Support	       - or -
Locus Computing Corp.		jackv@turnkey.TCC.COM

jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) (07/28/90)

In article <1012@cameron.egr.duke.edu> amr@dukee.egr.duke.edu (Anthony M. Richardson) writes:
>I mount a particular directory on another machine over a user directory...
>Everything seems to work fine after that except for mail.  If I just 
>type "mail" the program hangs.

I think this must be due to file locking over NFS not being supported.
I don't have access to PS/2 code, but I can tell you how to get mail to
work on another directory, e.g. /usr/mail.

1) Set the MAIL and MAILBOX environment variables in /etc/profile (or
$HOME/.profile) to be "/usr/mail/$LOGNAME/.newmail".  (I think we can only
tell bellmail what directory to use, so we're stuck with <dir>/.newmail.)
The MAILBOX var tells mail where to look, and MAIL tells the shell (so it
can tell you when new mail arrives).

2) Create a directory under /usr/mail for each user (yech) and make it 775,
owner bin and group mail.

3) Modify sendmail.cf: find the Mlocal mailer definition, and change the A=
field from "-D$z" to "-D/usr/mail/$u".  This tells bellmail where to put the
mail.

4) Run "/usr/lib/sendmail -bz" and restart the daemon.

This should do it: bellmail will put mail in /usr/mail/<user>/.newmail and
mail will find it there (if you use MH or some other mail reader, it should
allow you to specify the mailbox location).  It's a kludge, but it works!
-------------------------------------------------------------------------------
Peter Jeffe   ...uunet!cs.utexas.edu!ibmchs!auschs!sandino.austin.ibm.com!jeffe
        first they want a disclaimer, then they make you pee in a jar,
                   then they come for you in the night

richard@locus.com (Richard M. Mathews) (08/03/90)

jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) writes:

>In article <1012@cameron.egr.duke.edu> amr@dukee.egr.duke.edu (Anthony M. Richardson) writes:
>>I mount a particular directory on another machine over a user directory...
>>Everything seems to work fine after that except for mail.  If I just 
>>type "mail" the program hangs.

>I think this must be due to file locking over NFS not being supported.
>I don't have access to PS/2 code, but I can tell you how to get mail to
>work on another directory, e.g. /usr/mail.

I would not recommend doing this with a directory in the root file
system (in part because of paranoia about touching the root, in part
because there is a bit of overhead with replicated file systems (even
if you aren't using TCF), and in part because I think you might run into
some bugs if you don't have the appropriate updates installed).  If you
are using TCF (or plan to use TCF) I would not recommend anywhere in the
LOCAL file system either.  I think any other non-replicated file system
with sufficient free space would make sense.

Usual disclaimer: these are personal opinions, not necessarily those
of Locus or IBM.

Richard M. Mathews
Locus Computing Corporation
richard@locus.com
lcc!richard@ucla-se.ucla.edu