From: scrappy@io.org (Marc G. Fournier) Subject: NFS mounting mail directories Date: 14 Aug 1993 04:31:56 -0000
Hi...
First off, excuse the major cross-post, but it all seemed to
relate...
I'm running two Linux machines on the Internet right now,
on a 'sub-net' (right term?) consisting of three machines (the
two Linux, and a Unixware, which acts as our gateway machine).
Users on the system have access to either a menu interface
on the Unixware machine, or the Unix-shell on one of the Linux
machines. What we would like to do, but so far have been unable to,
is nfs mount the mail directory from Unixware to Linux.
The Linux machine is running pl12, the newest GCC and
libraries, smail 3.1.28, and elm 2.4 pl22. The Unixware server
is also running smail3.1.28.
Nfs-mounting the directories are easy...keeping the mail
from being screwed up is hard. basically, we need to do the following:
1 - if a user is reading email on the shell system, his mailbox
has to be locked in such a way that new incomig doesn't get
'lost'. What I've noticed so far is that if the user is
in the process of reading mail and a new one comes in, it
gets added properly...if a user is in the process of exiting
elm (our only mailreader for now), and a new mail comes in,
the new mail will get lost (this is between hitting 'q' and
either hitting 'y' to delete or getting to the prompt...
basically, while it is rewriting to 'opened' mailbox to
the spool directory)
2 - a user in the shell sends an email to a 'local' user, and
it writes it to the 'local' mail spool directory...what
happens if *both* smtpd's try to write to the same box
at the same time? is there/should there be a lock from
one smtpd?
I think those are the two major issue confronting me. Now,
from my limited understanding of this, I think that there is supposed
to be a C-function that will do the file locking over the NFS mount?
Is this correct, and if so, is it available (working) under the newest
Linux kernel? Even more specific, is it a kernel function? The only
thing that comes to mind is 'flock()'...heard it mentioned at one
time in relation to this...'configure' for elm finds flock, but
says it won't use it *shrug*
If anyone has any ideas, either of how to do this, or where
to find more information on how to do this, it would be much appreciated...
Thanks...
marc
-- Marc G. Fournier Public Access Internet Voice: 363-8676 Internex Online Inc FTP Telnet Data: 363-3783 Toronto, Ontario, Canada IRC MUDs Telnet: io.org