Annotation of 43BSDReno/share/doc/usd/08.mh/mh-alias.me, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.