By default, MH names your mail directory Mail (note the capital M) and puts it under your home directory. You can actually name this directory anything and put it anywhere on the filesystem. (It doesn't have to be in or under your home directory, but it should be someplace that you have permission to create new files and write.) For instance, you can "hide" the MH mail directory by putting a period (.) before its name. This means it won't clutter an ls listing of your home directory (unless you use ls -a, of course).
To change the name, change the Path: entry in your MH profile. By default, your MH directory name is Mail. So you should have this single Path: entry:
Path: MailIf your MH directory doesn't exist yet, MH will see your Path: and create it in the right place when you run your first MH command. If the directory already exists and you change the Path:, you'll need to move your directory. (If you're changing the directory name but not the location in the filesystem, you can use a command like mv oldname newname. If you want to move the directory someplace else, such as a subdirectory, you may need a command like tar to move your directory and preserve any links you've made.)
Here are rules for locating your MH directory. For this example, let's see what a user named Walt could do. His home directory is /u/walt.
Path: .MailIn this example, the exact location of Walt's directory would be /u/walt/.Mail.
Path: files/mh
Path: /u/walt/Mailand this entry in his /u/walt/.mh_profile file:
Path: MailNo matter what account he's logged on to, if he types a command like:
% folder +inbox inbox+ has 124 messages ( 12- 198); cur= 19.it will use the inbox folder in his /u/walt/Mail directory. When he types inc, the mail will go from his current account into that same inbox. (Each individual mail message file will still be owned by the account which created it. The group ownership will be set to the group which owns the folder. But, if the access permissions are set correctly -- in the Msg-protect: entry in .mh_profile -- this shouldn't be a problem. If Walt's machine has disk quotas, though, Walt should be sure that the other accounts will be allowed to make files on the filesystem which holds /u/walt.)
If there's a chance that more than one of the accounts will be used at the same time, Walt should think about putting the following two entries in each account's .mh_profile file:
context: context.username mh-sequences:The first entry sets a different MH context file for each username. (Those filenames aren't required. Files named context.1, context.2,... would be fine.) The empty second entry means that all sequences will be private -- that is, stored in the user's context file instead of in the folder. Both of those make conflicts between accounts less likely, though they will add some overhead.
alias repl 'if ($cwd !~ /u/*) pushd /u/walt; \repl'(That alias uses a simple-minded test: it checks the name of the first-level directory. If the filesystem with your MH directory has more than one top-level directory, the alias will use pushd more often than it needs to. You might want to use a more sophisticated test.)
Let's say that Walt installs that alias; his MH directory is under /u/walt. He wants to reply to a message while his current directory is /usr/local/system, which isn't on the /u filesystem:
% repl -noanno 23 /u/walt /usr/local/system ...Walt replies... % popd /usr/local/system
[Table of Contents] [Index] [Previous: International Character Support] [Next: Setting Access Permissions for Other Accounts]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>