From: dwcooley@colby.edu (David W. Cooley)
Subject: HP-UX and ULTRIX sharing a common NFS'ed mailbox area doesn't work 
Keywords: HP-UX, ULTRIX, mail, NFS
Reply-To: dwcooley@colby.edu (David W. Cooley)
Organization: Colby College, Waterville, Maine
Date: Wed, 30 Dec 1992 18:11:30 GMT




We are historically a dec and mac shop beginning to install HP 9K8?7 machines.  Our mail strategy has been to have a common pool of mail boxes (...spool/mail for DEC folks, /usr/mail for HP-UX) NFS'ed to all machines under the management of the Computer Services group.  We also run a POP server on the pool for Mac users who wish toread mail on their Mac using Eudora.  Users may have accounts on multiple machines and want to have access to their mail from each.  The uid/gid/user name/group name data across 

all machines is managed as a unified entity.

This has worked very well until we tried to integrate HP machines into this environment (HP 9K 827 running HP-UX 8.02).

The presenting problem is that mail delivered by HP-UX to a mailbox stored on a ULTRIX NFS server does not have its UID/GID set appropriately.

After poking around a bit, it seems that HP-UX and ULTRIX use different strategies for setting and maintaining ownership of mailboxes.  ULTRIX apears to initially run the delivery program as setuid-root and does either a setreuid(2) to the users uid before creating/opening the mailbox or does a chown(2) after it has been created.  HP-UX on the other hand is set so that any user can change the ownership of any file to any other user.  This non-privileged use of chown(2) does not seem to work over NSF, proba

bly because ULTRIX on the server does not support it.  Essentially HP-UX machines can not deliver mail to mailboxes residing on and NFSed from an ULTRIX machines.

We have identified two other problem areas.

One problem area is the difference between the group ownerships on HP-UX and ULTRIX mailbox directories, mail files, and mail programs. On HP-UX it appears that the mailbox directory and the mailboxes have gid mail, the mailboxes are rw to gid mail, and two of the three mail readers (elm and mail) are setgid-mail (mailx is not).  On Ultrix, the mailbox directory is owned by root/system, the mailboxes are rw to user only, /usr/bin/mail is setuid-root, setgid-kmem, and /usr/ucb/mail runs with the uid/gid of 

the user.  From this it appears that HP-UX mailboxes and some mail readers require special gid treatment which ULTRIX mailboxes do not. This probably implies that ULTRIX mail readers can not be used on mailboxes residing on and NFSed from HP-UX machines.

The other problem ares is the incompatibility of the "UNIX" "From" header line (the one without the colon) used to separate messages in a mail box. We see this when ULTRIX mail readers (notably /usr/ucb/mail) try to read mail delivered by a HP-UX delivery program.  The contents of a mailbox is parsed into separate messages based on the existance of the "UNIX" from header line at the start of every message.  The HP-UX from line is missing the two second digits and associated colon in the timestamp (this is 

contrary to HP-UX documentation on message format (Mail Systems: User's Guide (B1862-90012), page 8-13).  ULTRIX seems to make a rather rigid test for the From line requiring the existance of the seconds field.  Thus a message delivered by HP-UX as the first message in the mailbox disappears when read on an ULTRIX machine.  If it is delivered by HP-UX after a message delivered by an ULTRIX machine it gets appended to that message when read on an ULTRIX machine.  For all intents and purposes ULTRIX machines

 can not read messages delivered by HP-UX machines (say acting as a mail server).

To summarize:

a)	It seems reasonable to expect that one could set up a common mail environment across many UNIX machines from many vendors and have all the pieces fit and work.

b)	Users want to get their mail on any machine they happen to be using at the moment and not have to worry about which machine has their mail or that multiple machines may have their mail. (At least mine do, all 2000 of them on 500 Macs, several timesharing machines, and an increasing number of workstations.)

c)	Inconsistancies between the way vendors handle file permissions, ownership, groupship, and format currently prohibit this from happening.
(It appears easier to provide common mail between a single UNIX system and Macs than between two different UNIX systems.  Folks at HP tell me that mailx will not even handle mail NFSed between two HP-UX systems.

d)	HP-UX and ULTRIX systems as delivered can not do this!  (There may be others as well, but my experience is limited to the two mentioned.)

e)	There ought to be efforts to standardize c) above so that d) is not a fact.  (These may be underway, but I am unaware of them, and obviously they have yet to have an impact on the situation outlined here).

We have fallen into this trap.  It is going to slow down our progress on integrating HP equipment into our computing environment.  (The same could be said of DEC equipment if one were historically an HP shop.)  It is also going to consume scarce staff time fixing it, or it will result in an increase in user frustration.  Has anyone else run into this problem?  Does anyone have any suggestions for a fix?

:-(

Dave

    
--
David W. Cooley                                    e-mail:    dwcooley@colby.edu
Associate Director for Technical Services          phone:          (207)872-3581
Computer Services                                  fax:            (207)872-3555
Colby College
Waterville, Maine 04901






Newsgroups: comp.sys.hp