Defining Alternate Mailboxes

[previous] [next] [table of contents] [index]

If you get mail at more than one "mailbox," you'll probably want to tell MH about your alternate mailboxes. In other words, if you receive mail at more than one address on one or more computers -- but all the mail is put into a single set of mail folders -- then the other addresses are your "alternate mailboxes."

This can happen with a setup like the one in the Section Changing MH Directory Name, where Walt is getting mail from three accounts that all inc into the same set of folders. It can also happen when mail is forwarded from other accounts -- for example, with a .forward file under UNIX Sendmail, a SET FORWARD command under VMS Mail, etc.

Some good reasons to tell MH the addresses of these alternate mailboxes:

Let's go on with the example of Walt, above. People can send mail to him at walt, project, and walter. But he receives and answers it all on the walt account. He should put this entry in the .mh_profile file on his walt account:
Alternate-Mailboxes: project, walter
That entry may not be enough to catch all of the mail, though; the Alternate-Mailboxes: entry has to match the From: address exactly. Depending on Walter's computer, some of the mail he sends may have his full network address (like walt@xxx.yyy.zzz) in the From: header field. An asterisk (*) means "match all." So Walt may want to use this entry instead:
Alternate-Mailboxes: project@*, walter@*
That matches any addresses that start with project@... or walter@.... Unfortunately, it also includes addresses that start with those words on other computers -- even if they're not his accounts. The following entry with his fully qualified hostname might be best of all:
Alternate-Mailboxes: project, project@xxx.yyy.zzz,
	walter, walter@xxx.yyy.zzz
(You can continue an entry on another line by ending a line with a comma and indenting the next line with space or a tab.) Finally, if Walt reads mail while logged on to either of his walter or project accounts, he should put Alternate-Mailboxes: entries in the .mh_profile files on those accounts.

[Table of Contents] [Index] [Previous: Setting Access Permissions for Other Accounts] [Next: Sharing Other Users' Folders]

Last change $Date: 1996/06/06 15:09:36 $

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 <>