From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b612,7a01654699d9257f X-Google-Attributes: gid10b612,public X-Google-Thread: 1164f8,7a01654699d9257f X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,7a01654699d9257f X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-01-02 04:55:26 PST Newsgroups: comp.unix.osf.osf1,comp.unix.ultrix,comp.sys.dec Path: nntp.gmd.de!Germany.EU.net!netmbx.de!zib-berlin.de!uniol!Klaus.Moeller From: Klaus.Moeller@arbi.informatik.uni-oldenburg.de (Klaus Moeller) Subject: Re: Mail Locking Ultrix/OSF Organization: University of Oldenburg, Germany Date: Mon, 2 Jan 1995 12:28:39 GMT Message-ID: <1995Jan2.124404.1101@arbi.Informatik.Uni-Oldenburg.DE> References: <3e1p6l$i3f@amhux3.amherst.edu> Sender: news@arbi.Informatik.Uni-Oldenburg.DE Xref: nntp.gmd.de comp.unix.osf.osf1:7068 comp.unix.ultrix:16391 comp.sys.dec:20758 pdchapin@unix.amherst.edu (PAUL D. CHAPIN) writes: >In the past, we've nfs shared a single filesystem containing mail >messages across mutliple Ultrix workstations. This makes it nice since >you can get your mail anywhere, and people don't have to know what >node you work on to send you mail. And it's a lot easier than having >to worry about a central mail hub. >The problem is that we're adding OSF/1 workstations, and they aren't >being very cooperative. It's no problem to mount the mail filesystem >and read messages from it, but it you try to mail anything to it you >get various kinds of locking problems. I can find very little doc on >file locking with mail under Ultrix. I'm beginning to suspect that >this was tightened up on OSF to get rid of some mail related security >problems. The question is whether this basic strategy will work at all >across Ultrix/OSF platforms and would it make any difference if I >moved the mail filesystem from Ultrix to OSF? There are three ways to lock a file under UNIX 1) Dotfile based locking. I.e. to lock a file create a file .lock. Not totally secure (you might get race conditions), locks only a complete file but it works on almost everything, even NFS and *ancient* versions of UNIX. Be sure that the process id is *not* written to the lock file. (Process id is a method to detect stale locks but does not work on a network, for example if the writing process is on a different machine than the stale-lock-checking-process.) 2) flock or fcntl based locking. Advisory locking mechanism that allows locking of a part of a file. DOES NOT WORK OVER NFS. 3) lockf based locking. Works over NFS. Operation similiar to that of fcntl. Should be the locking mechanism of choice if it weren't almost allways broken. I recomend not to use it, since you can't even expect lockd to work over different releases of the same OS. OSF 2.1 and up allows you to select between dotfile and fcntl based locking (decribed in the Mail man page). Server setup: Local delivery for all client and the server. Export mail spool directory to clients. Client setup: Mount mail spool. Setup delivery of all mail to the server. All: Select ONE locking mechanism for all MUAs, MTAs and utilities like procmail, pop/imap servers etc.. If you can: Nuke Sendmail and get Smail 3.1.29.1. Locking mechanism can be selected at runtime (don't know if Sendmail can do this too) and config files are easier to administer. (Just the opinion of a smail lover) Klaus -- / Klaus Moeller, Leiteweg 2, 26384 Wilhelmshaven, Germany \ < Klaus.Moeller@Informatik.Uni-Oldenburg.DE 078326@DOLUNI1.BITNET > \ security is an exercise in applied paranoia /