Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.mail.sendmail Subject: Re: Delivery to home directories Message-ID: <1991Apr24.214012.23040@mp.cs.niu.edu> Date: 24 Apr 91 21:40:12 GMT References: <1991Apr24.210106.5287@ccu.umanitoba.ca> Organization: Northern Illinois University Lines: 51 In article <1991Apr24.210106.5287@ccu.umanitoba.ca> mills@ccu.umanitoba.ca (Gary Mills) writes: >Recently, I enquired if it would be reasonable to apply disk quota to >the mail spool to discourage users from keeping huge mailboxes there. >The consensus was that it wasn't a good idea. One novel suggestion I >received was a cron command that moved huge mailboxes to the user's home >directories and notified them how to access mail there. > >So, thought I, why not just modify /bin/mail to deliver all mail to files >in the home directories? Has anyone already done this? Would there be The BSD distribution of binmail sources has, if I recall, the code to do the following: If /usr/spool/mail/username is a directory, append /username to the end and try again. This code is commented out. I haven't looked too closely so I am not sure if this would work with symbolic links. However something like that is doable. Probably you could just modify the code so instead of writing to /usr/spool/mail/username it writes to $HOME/mailbox for the user, with some backup alternative if the directory is not available. You could then install a symlink for the benefit of other mail software. (binmail itself refuses to accept a mailbox name which is a symlink, for security reasons - important since it runs as root). Your real problem is that you are not using BSD binmail, you are using SUN binmail. >a problem with this scheme? Some home directories would be NFS-mounted, >as opposed to the mail spool, which is a local disk. What locking scheme >does /bin/mail use? I haven't seen this documented. We have numerous BSD binmail uses flock. I think SUN binmail uses both this and a lock file (perhaps mailboxname.lock), but I am not certain about that. >mail user agents, such as ``Mail'', ``elm'', and ``mush''. Do they all >use the same locking? The Sun version of Mail uses the same locking as the Sun version of binmail. I can't speak for elm or mush, but it probably depends on configuration options. Personally I think you would be better of only doing this for the small number of users who really give problems. You could try installing Chip Salzenberg's 'deliver' package for this purpose, and use aliases to handle the bad cases via deliver. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940