SUMMARY: NFS mounting /var/spool/mail && file locking

SUMMARY: NFS mounting /var/spool/mail && file locking

Post by Dan Moseda » Fri, 02 Oct 1992 03:51:31



A while ago, I posted a question asking what the deal was with having
a single /var/spool/mail mounted via NFS on many machines.  I was
curious whether lockd bugs could cause mail to be lost.  Specifically,
I was interested in how SunOS and Ultrix dealt with this, and how elm
and sendmail fit into the picture.

I apologize for taking so long to summarize; there are two main things
that I found out:

1) Mail user agents (/usr/ucb/mail -- Ultrix & SunOS, elm, etc.)
generally use a second file to lock the mailbox such as
/usr/spool/mail/mosedale.lock.  This seems to keep many problems at
bay.

2) It is considered a very good idea to have the mail transfer agent
(eg sendmail) on the subsidiary machines punt all incoming mail to
/var/spool/mail's home machine and have it delivered only on that home
machine.  In SunOS, this is done by setting up sendmail.cf to use the
OR command (see /usr/lib/sendmail.subsidiary.cf).  Ultrix sendmail
looks like it may a similar capability, but I'm not entirely clear on
how it works.  IDA sendmail can do this using the MAILSERVER macro in
the m4 source file for sendmail.cf.

The general consensus seems to be that these measures are reasonable
solutions, and almost no-one has had any lost mail problems once these
are in place.

Thanks to everyone who helped me out.

Dan Mosedale

 
 
 

SUMMARY: NFS mounting /var/spool/mail && file locking

Post by Jack Brya » Fri, 02 Oct 1992 07:30:51


How do those using a shared mail spool mount it?  We've had few problems
w/hard mount for the past two years, but a recent network glitch equivalent
to yanking the ethernet cable from the back of our mail server was a
disaster for the entire net, what w/comsat leaving most users thinking the
machine was hung up.  A ton of abandoned processes left idle machines w/load
levels of 8 and more.

So, how do you mount your mail spool -- soft, intr, or what?

Thanks,
Jack

 
 
 

SUMMARY: NFS mounting /var/spool/mail && file locking

Post by Barry Margol » Fri, 02 Oct 1992 16:56:40




>>In SunOS, this is done by setting up sendmail.cf to use the
>>OR command (see /usr/lib/sendmail.subsidiary.cf).
>When the R option is enabled, *all* mail gets delivered through the
>mail host.  The From: address on outbound mail gets set to the name
>of your domain, rather than your individual hostname.  This is not
>always the correct thing to do.

The context of the suggestion was that everyone is NFS-mounting
/usr/spool/mail from the mail host.  In that case, why wouldn't it be
correct for the From: address to be an address that gets delivered to that
host?

Clearly, any machine that has its own /usr/spool/mail would not use this
feature, but that's not what we're talking about.
--
Barry Margolin
System Manager, Thinking Machines Corp.


 
 
 

SUMMARY: NFS mounting /var/spool/mail && file locking

Post by Eduardo Rodrigu » Fri, 02 Oct 1992 23:45:21



> How do those using a shared mail spool mount it?  We've had few problems
> w/hard mount for the past two years, but a recent network glitch equivalent
> to yanking the ethernet cable from the back of our mail server was a
> disaster for the entire net, what w/comsat leaving most users thinking the
> machine was hung up.  A ton of abandoned processes left idle machines w/load
> levels of 8 and more.

> So, how do you mount your mail spool -- soft, intr, or what?

intr. In soft it's easy to lost data (when NFS problems).

edo...

 
 
 

SUMMARY: NFS mounting /var/spool/mail && file locking

Post by Steve Lod » Sat, 03 Oct 1992 02:31:31





> >>In SunOS, this is done by setting up sendmail.cf to use the
> >>OR command (see /usr/lib/sendmail.subsidiary.cf).
> >When the R option is enabled, *all* mail gets delivered through the
> >mail host.  The From: address on outbound mail gets set to the name
> >of your domain, rather than your individual hostname.  This is not
> >always the correct thing to do.

> The context of the suggestion was that everyone is NFS-mounting
> /usr/spool/mail from the mail host.  In that case, why wouldn't it be
> correct for the From: address to be an address that gets delivered to that
> host?

> Clearly, any machine that has its own /usr/spool/mail would not use this
> feature, but that's not what we're talking about.

I don't know what he meant, but I interpreted it this way:

When all mail goes thru the mailhost with some obscure name that the
users don't like, it is not preferred.  The users would like their

We had that problem here, but squashed it.

Steve
--

"The cheapest, fastest, and most reliable components of a computer system are
those that aren't there."  --  Gordon Bell

 
 
 

SUMMARY: NFS mounting /var/spool/mail && file locking

Post by Bill Wisn » Sat, 03 Oct 1992 05:22:23



>The context of the suggestion was that everyone is NFS-mounting
>/usr/spool/mail from the mail host.

Here, everyone mounts /usr/spool/mail from a server that *isn't* the
mail host -- each workstation handles its own mail.

Quote:>In that case, why wouldn't it be
>correct for the From: address to be an address that gets delivered to that
>host?

Because the server from which /usr/spool/mail gets mounted doesn't
necessarily know about every user on every workstation.

NIS, you say?  Yes, we use an NIS passwd map -- but our smallest NIS
domain has nine servers, and any given user's mail spool is contained
on precisely one of those servers.

We could start maintaining lists of which users are on which servers
and have servers handle mail rather than individual workstations, but
that would simply add another layer of complexity and difficulty to
our jobs, and our present system works quite well.


I shouldn't even have to mention that I don't speak for Sun.

 
 
 

SUMMARY: NFS mounting /var/spool/mail && file locking

Post by Jim Pirz » Sat, 03 Oct 1992 11:10:03






>> >>In SunOS, this is done by setting up sendmail.cf to use the
>> >>OR command (see /usr/lib/sendmail.subsidiary.cf).
>> >When the R option is enabled, *all* mail gets delivered through the
>> >mail host.  The From: address on outbound mail gets set to the name
>> >of your domain, rather than your individual hostname.  This is not
>> >always the correct thing to do.

>> The context of the suggestion was that everyone is NFS-mounting
>> /usr/spool/mail from the mail host.  In that case, why wouldn't it be
>> correct for the From: address to be an address that gets delivered to that
>> host?

>> Clearly, any machine that has its own /usr/spool/mail would not use this
>> feature, but that's not what we're talking about.
>I don't know what he meant, but I interpreted it this way:
>When all mail goes thru the mailhost with some obscure name that the
>users don't like, it is not preferred.  The users would like their

>We had that problem here, but squashed it.

We have another case where you do not want the /var/spool/mail server's
name as the source of the mail.  We have a client machine that is a UUCP
server, and the mail directories are on a fileserver.  To have a proper
return address, the mail must not have the fileserver's name but the
UUCP server's name.

- Jim

--

TAC System Administrator, USArmy Construction Engineering Resarch Labs
/* Hello, we're the government and we're here to help you. :) */

 
 
 

1. More mail file locking questions (lockf, NFS, /var/spool/mail/*.lock)

        Here's a problem I've run into:

        The problem I've seen relates to building mh-6.8 for SVR4
        (and correspondingly LOCKF). Now, it appears that while
        INC believes the mail file (NFS mounted) should be
        locked, it isn't (or it is lockf'ed and someone else
        [/bin/mail?] isn't honoring the lock; it says something
        like "New mail has arrived.."). It appears that /bin/mail
        (on 4.1.x and Solaris 2.x) uses lock files
        (/var/spool/mail/*.lock).  

        My question is, should mh ({l}emacs, popper,imap,...)
        use this style (and abandon lockf), or is there some
        other appropriate solution to this problem?

        Thanks,

        Dave    

        David M. Meyer                  Voice:     503/346-1747
        Senior Network Engineer         Pager:     503/342-9458
        Office of University Computing  FAX:       503/346-4397

        University of Oregon
        1225 Kincaid
        Eugene, OR 97403        

2. Need XConfig for Trident TVGA 8900 and CTX CVP-5468 monitor

3. Frequency of NFS lock problems w/ NFS mounted mail spool

4. NFS won't mount in RW mode.

5. SUMMARY: NFS mounting mail spool dir: Pros/Cons?

6. Recommended 56K modem for Solaris 8 x86?

7. mail folder is in /var/mail or /var/spool/mail

8. TOO fast sound playback

9. nfs mounted /var/spool/mail causing problems

10. NFS /var/spool/mail mounts

11. /var/spool/mail vs. /usr/spool/mail

12. /var/mail: to NFS mount or not to NFS mount?

13. editing the root mail file in /var/spool/mail