|
|
1.1 ! root 1: .\" This file is automatically generated. Do not edit! ! 2: .TH MH\-ALIAS 5 "April 22, 1986" MH [mh.6] ! 3: .UC 6 ! 4: .SH NAME ! 5: mh\-alias \- alias file for MH message system ! 6: .SH SYNOPSIS ! 7: .in +.5i ! 8: .ti -.5i ! 9: any \fIMH\fR command ! 10: .in -.5i ! 11: .SH DESCRIPTION ! 12: This describes both \fIMH\fR personal alias files and ! 13: the (primary) alias file for mail delivery, the file ! 14: ! 15: /usr/new/lib/mh/MailAliases ! 16: ! 17: It does \fBnot\fR describe aliases files used by the message transport system. ! 18: Each line of the alias file has the format: ! 19: ! 20: alias : address\-group ! 21: .br ! 22: or ! 23: .br ! 24: alias ; address\-group ! 25: .br ! 26: or ! 27: .br ! 28: < alias\-file ! 29: .br ! 30: ! 31: where: ! 32: ! 33: address\-group := address\-list ! 34: .br ! 35: | \*(lq<\*(rq file ! 36: .br ! 37: | \*(lq=\*(rq UNIX\-group ! 38: .br ! 39: | \*(lq+\*(rq UNIX\-group ! 40: .br ! 41: | \*(lq*\*(rq ! 42: ! 43: .br ! 44: address\-list := address ! 45: .br ! 46: | address\-list, address ! 47: .br ! 48: ! 49: Continuation lines in alias files end with `\\' followed by the newline ! 50: character. ! 51: ! 52: Alias\-file and file are UNIX file names. ! 53: UNIX\-group is a group name (or number) from \fI/etc/group\fR. ! 54: An address is a \*(lqsimple\*(rq Internet\-style address. ! 55: Througout this file, case is ignored, except for alias\-file names. ! 56: ! 57: If the line starts with a `<', then the file named after the `<' is ! 58: read for more alias definitions. The reading is done recursively, so a `<' ! 59: may occur in the beginning of an alias file with the expected results. ! 60: ! 61: If the address\-group starts with a `<', ! 62: then the file named after the `<' is read and its contents are added to ! 63: the address\-list for the alias. ! 64: ! 65: If the address\-group starts with an `=', ! 66: then the file \fI/etc/group\fR is consulted ! 67: for the UNIX\-group named after the `='. ! 68: Each login name occurring as a member of the group is added to the ! 69: address\-list for the alias. ! 70: ! 71: In contrast, if the address\-group starts with a `+', ! 72: then the file \fI/etc/group\fR is consulted ! 73: to determine the group\-id of the UNIX\-group named after the `+'. ! 74: Each login name occurring in the \fI/etc/passwd\fR file whose group\-id ! 75: is indicated by this group is added to the address\-list for the alias. ! 76: ! 77: If the address\-group is simply `*', ! 78: then the file \fI/etc/passwd\fR is consulted ! 79: and all login names with a userid greater than some magic number ! 80: (usually 200) are added to the address\-list for the alias. ! 81: ! 82: In match, a trailing * on an alias will match just about anything appropriate. ! 83: (See example below.) ! 84: ! 85: An approximation of the way aliases are resolved at posting time is ! 86: (it's not really done this way): ! 87: ! 88: .in +.5i ! 89: 1) Build a list of all addresses from the message to be ! 90: delivered, eliminating duplicate addresses. ! 91: ! 92: 2) If this draft originated on the local host, ! 93: then for those addresses in the message that have no host specified, ! 94: perform alias resolution. ! 95: ! 96: 3) For each line in the alias file, ! 97: compare \*(lqalias\*(rq against all of the existing addresses. ! 98: If a match, remove the matched \*(lqalias\*(rq from the address list, ! 99: and add each new address in the address\-group to the address list ! 100: if it is not already on the list. ! 101: The alias itself is not usually output, ! 102: rather the address\-group that the alias maps to is output instead. ! 103: If \*(lqalias\*(rq is terminated with a `;' instead of a `:', ! 104: then both the \*(lqalias\*(rq and the address are output ! 105: in the correct format. ! 106: (This makes replies possible since \fIMH\fR aliases and ! 107: personal aliases are unknown to the mail transport system.) ! 108: .in -.5i ! 109: ! 110: Since the alias file is read line by line, forward references ! 111: work, but backward references are not recognized, thus, there is ! 112: no recursion. ! 113: ! 114: \fBExample:\fR ! 115: .nf ! 116: .in +.5i ! 117: </usr/new/lib/mh/BBoardAliases ! 118: sgroup: fred, fear, freida ! 119: fred: frated@UCI ! 120: UNIX\-committee: <unix.aliases ! 121: staff: =staff ! 122: wheels: +wheel ! 123: everyone: * ! 124: news.*: news ! 125: .in -.5i ! 126: .fi ! 127: ! 128: The first line says that more aliases should immediately be read from ! 129: the file \fI/usr/new/lib/mh/BBoardAliases\fR. ! 130: Following this, \*(lqfred\*(rq is defined as an alias for ! 131: \*(lqfrated@UCI\*(rq, ! 132: and \*(lqsgroup\*(rq is defined as an alias for ! 133: the three names \*(lqfrated@UCI\*(rq, \*(rqfear\*(rq, and \*(rqfreida\*(rq. ! 134: Next, the definition of \*(lqUNIX\-committee\*(rq is given by reading ! 135: the file \fIunix.aliases\fR in the users \fIMH\fR directory, ! 136: \*(lqstaff\*(rq is defined as all users who are listed as members of ! 137: the group \*(lqstaff\*(rq in the \fI/etc/group\fR file, ! 138: and \*(lqwheels\*(rq is defined as all users whose group\-id in ! 139: \fI/etc/passwd\fR is equivalent to the \*(lqwheel\*(rq group. ! 140: Finally, \*(lqeveryone\*(rq is defined as all users with a user\-id in ! 141: \fI/etc/passwd\fR greater than 200, ! 142: and all aliases of the form \*(lqnews.<anything>\*(rq are defined ! 143: to be \*(lqnews\*(rq. ! 144: ! 145: The key thing to understand about aliasing in \fIMH\fR ! 146: is that aliases in \fIMH\fR alias files are expanded into the ! 147: headers of messages posted. ! 148: This aliasing occurs first, ! 149: at posting time, ! 150: without the knowledge of the message transport system. ! 151: In contrast, ! 152: once the message transport system is given a message to deliver ! 153: to a list of addresses, ! 154: for each address that appears to be local, ! 155: a system\-wide alias file is consulted. ! 156: These aliases are \fBNOT\fR expanded into the headers of messages delivered. ! 157: .Hh ! 158: To use aliasing in \fIMH\fR quickly, do the following: ! 159: ! 160: .in +.5i ! 161: First, in your \fI\&.mh\(ruprofile\fR, ! 162: choose a name for your primary alias file, say \*(lqaliases\*(rq, ! 163: and add three lines: ! 164: ! 165: .nf ! 166: .in +.5i ! 167: ali: \-alias aliases ! 168: send: \-alias aliases ! 169: whom: \-alias ailases ! 170: .in -.5i ! 171: .fi ! 172: ! 173: Second, create the file \*(lqaliases\*(rq in your \fIMH\fR directory. ! 174: ! 175: Third, start adding aliases to your \*(lqaliases\*(rq file as appropriate. ! 176: .in -.5i ! 177: .Fi ! 178: ^/usr/new/lib/mh/MailAliases~^Primary alias file ! 179: .Pr ! 180: None ! 181: .Sa ! 182: ali(1), send(1), whom(1), group(5), passwd(5), conflict(8), post(8) ! 183: .De ! 184: None ! 185: .Co ! 186: None ! 187: .Hi ! 188: In previous releases of \fIMH\fR, ! 189: only a single, system\-wide mh\-alias file was supported. ! 190: This led to a number of problems, ! 191: since only mail\-system administrators were capable of (un)defining ! 192: aliases. ! 193: Hence, ! 194: the semantics of mh\-alias were extended to support personal alias files. ! 195: Users of \fIMH\fR no longer need to bother mail\-system administrators for ! 196: keeping information in the system\-wide alias file, ! 197: as each \fIMH\fR user can create/modify/remove aliases at will from any ! 198: number of personal files. ! 199: .Bu ! 200: Although the forward\-referencing semantics of \fImh\-alias\fR files prevent ! 201: recursion, the \*(lq<\ alias\-file\*(rq command may defeat this. Since the ! 202: number of file descriptors is finite (and very limited), such infinite ! 203: recursion will terminate with a meaningless diagnostic when all the fds are ! 204: used up. ! 205: .En
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.