[comp.unix.questions] Network-wide Mail Spool?

wnp@iiasa.AT (wolf paul) (10/31/90)

I would like some comments/advice on the feasibility of having a
central mail spool directory for all users on a UNIX LAN, which
would be cross-mounted to all machines.

I have users who log in on different machines at different times,
but expect to be notified by their shell or biff when new mail for
them arrives, regardless of where they are logged in.

Short of aliasing each user to a list of all machines, which would
produce multiple copies of his/her mail, the above seems to be the
only solution.

However, I would like to know if I should expect problems with
processes on different machines accessing the file at the same time.
Are the lock file mechanisms based on process ids (in which case they
are not guaranteed to be unique if different machines access the file,
nor will a "kill -0" produce the right result)?

The network has two VAXen running Ultrix 3.0, several VAXstations
also running Ultrix 3.0, several SUN SparcStations, and a couple
of 386 machines with System V. We use the standard mailers which
come with each OS, as well as elm and mh. We are currently using
sendmail, but are thinking about switching to smail3.
-- 
Wolf N. Paul, UNIX SysAdmin, IIASA, A - 2361 Laxenburg, Austria, Europe
PHONE: +43-2236-71521-465     FAX: +43-2236-71313      UUCP: uunet!iiasa!wnp
INTERNET: wnp%iiasa@relay.eu.net      BITNET: tuvie!iiasa!wnp@awiuni01.BITNET

jjb@cs.wayne.edu (Jon J. Brewster) (11/01/90)

We do have a network-wide mail spool here, nfs-mounted on a number
of Sun and DEC (Ultrix) hosts.  I have seen no problems that could
be traced to this arrangement.  I modified the sendmail.cf file
on all machines except one, the mailhost, to forward mail to the
mailhost instead of doing local mail delivery.  I suspect this is
essential to making things work properly.  (I didn't use Sun's  OR
macro because it produced some unwanted effects in conjunction with
mail originating within rn(1).)

This scheme works both will a mail spool which physically resides
on the mailhost and with one which is nfs-mounted from another
server.


-- 
-jjb

haynes@ucscc.UCSC.EDU (99700000) (11/01/90)

One thing you have to consider here is whether security is going to be
a problem.  With ordinary NFS any workstation on which the user can
become root allows the user to impersonate any other user and read
the mail.
I guess 'secure NFS' is a way around this.  We're planning to use the MIT
Project Athena technology, in which mail is delivered to post-office
machines.  The users at workstations access it from there using a
Kerberos-authenticated POP protocol.  Another Athena component, Zephyr,
is used for incoming mail notification.
haynes@ucscc.ucsc.edu
haynes@ucscc.bitnet
..ucbvax!ucscc!haynes

"Any clod can have the facts, but having opinions is an Art."
        Charles McCabe, San Francisco Chronicle

rickg@toshiba.tic.oz (Rick Gunderson) (11/02/90)

In <924@iiasa.UUCP> wnp@iiasa.AT (wolf paul) writes:

>I would like some comments/advice on the feasibility of having a
>central mail spool directory for all users on a UNIX LAN, which
>would be cross-mounted to all machines.

>I have users who log in on different machines at different times,
>but expect to be notified by their shell or biff when new mail for
>them arrives, regardless of where they are logged in.

On Sun386i machines running SunOS 4.0.2, $USER can have her/his mail delivered
straight to their home directory (/home/$USER/mail/inbox). This means that no
matter where $USER logs into, he/she can read their mail because (at least
under SunOS) their home directories are always auto-mounted on the host on
which they login.

The /bin/mail program in SunOS 4.0.2 consults a yellow pages map called
``policies'' that (among other things) determines if mail should be delivered
to /home/$USER/mail/inbox to the (usual) /usr/spool/mail/$USER file on the
machine that exports the /home/$USER directory (I'll call this machine the
``homehost'').

Unfortunately, on non-Sun386i Sun workstations, the /bin/mail program is "dumb"
and always delivers to /usr/spool/mail/$USER on the homehost machine (which
causes the hassle that you are trying to avoid) :-(.

Why Sun didn't supply the Sun386i-style of /bin/mail with their other
workstations is anybodies guess.

>... We are currently using
>sendmail, but are thinking about switching to smail3.

One suggestion would be (since you say you are running sendmail) to fix your
sendmail.cf file so that _local_ mail deliveries are not handled by /bin/mail
but are handled by a program that you write called (say) homemail.

The homemail program could then deliver mail sent to $USER in
/home/$USER/mail/inbox rather than to the /usr/spool/mail/$USER that /bin/mail
always delivers to.

Another suggestion would be to simply export the /usr/spool/mail/$USER file
so and mount it on every machine that $USER logs in on. Mail delivery would
still always be done on the homehost of $USER (via sendmail) and $USER could
read his/her mail file on any machine on which it is mounted.


Good luck!

Rick

-- 
==============================================================================
=                Rick Gunderson - Toshiba International Corp.                =
=      ACSnet: rickg@toshiba.tic.oz    Internet: rickg@toshiba.tic.oz.au     =
=      Phone:  61-2-428-2077           Fax:      61-2-427-7405               =
=      Post:   Private Bag 29, Lane Cove, NSW, Australia 2066                =
==============================================================================

aspgpas@cidsv01.cid.aes.doe.CA (Peter Silva) (11/21/90)

In a heterogeneous environment, WATCH OUT!
We have some systems that know about the NFS lock and stat daemons,
and others that don't.  Net effect:

	unknown mailer error 1
	cannot append to /usr/mail/logname


Had to switch it off on the ones that know about it for now (I'm glad
it was configurable!)

Peter Silva			OS Support 
psilva@cid.aes.doe.ca		Dorval Computing Centre
(514) 421-4692			Atmospheric Environment Service

tage@staff.cs.uit.no (Tage Stabell-Kuloe) (11/28/90)

In article <1990Nov21.145704.10122@cid.aes.doe.CA> aspgpas@cidsv01.cid.aes.doe.CA (Peter Silva) writes:
>We have some systems that know about the NFS lock and stat daemons,
>and others that don't.  Net effect:
>	unknown mailer error 1
>	cannot append to /usr/mail/logname
>Had to switch it off on the ones that know about it for now (I'm glad
>it was configurable!)
>Peter Silva

Do the following :
	0) Use NFS to mount /usr/spool/mail onto one server.
	1) Use MX in BIND to point to the server for all other
	   machines.
	2) Read mail to root on that (mail) server.
	3) (If you know how to do it) Rewrite sendmail.cf on all the machines
	   to output the (mail)server as sender on all mail.  This is not
	   really necessary but makes things more elegant. 

-- 
////      Tage Stabell-Kuloe            |e-mail  : tage@staff.cs.uit.no    ////
///Dept. of Computer Science, University|Official: postmaster@cs.uit.no    ///
//of Tromsoe, N-9000 TROMSOE, NORWAY    |Phone   : +47-8344053/44041       //
/      "'oe' is '\o{}' in TeX"          |#include: <disclaimer.std>        /