mills@ccu.umanitoba.ca (Gary Mills) (04/25/91)
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 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 mail user agents, such as ``Mail'', ``elm'', and ``mush''. Do they all use the same locking? We run SunOS 4.1.1, with NFS, NIS, and DNS, if it matters. -- -Gary Mills- -Networking Group- -U of M Computer Services-
rickert@mp.cs.niu.edu (Neil Rickert) (04/25/91)
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 <rickert@cs.niu.edu> Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940
berg@marvin.e17.physik.tu-muenchen.de (Stephen R. van den Berg) (04/30/91)
Neil Rickert writes: >Gary Mills writes: > 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. > The Sun version of Mail uses the same locking as the Sun version of binmail. Both Sun binmail and Mail use mailboxname.lock as a lockfile. They don't seem to use flock though. -- Sincerely, berg@marvin.e17.physik.tu-muenchen.de Stephen R. van den Berg. "I code it in 5 min, optimize it in 90 min, because it's so well optimized: it runs in only 5 min. Actually, most of the time I optimize programs."