{
    "mode": "man",
    "parameter": "mh-alias",
    "section": "5mh",
    "url": "https://www.chedong.com/phpMan.php/man/mh-alias/5mh/json",
    "generated": "2026-05-30T07:10:44Z",
    "sections": {
        "NAME": {
            "content": "mh-alias - format of nmh email-address alias files\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Each line of an nmh alias file takes one of the following forms:\n\nalias : address-group\n\nalias ; address-group\n\n< alias-file\n\n; | : | # comment\n\nwhere:\n\naddress-group  := address-list\n|  < file\n\naddress-list   := address\n|  address-list, address\n\nContinuation  lines  end with “\\” followed by a newline character.  This also applies to com‐\nment lines.  Thus, the line following a “\\”-terminated comment line is a continuation of that\ncomment line.\n\nAlias-file  and file are Unix file names.  Alias file contents are case-insensitive, with the\nexception of filesystem path names.\n\nIf the line starts with a “<”, the file named after the “<” is read for  more  alias  defini‐\ntions.  The reading is done recursively, so a “<” may occur in the beginning of an alias file\nwith the expected results.\n\nIf the address-group starts with a “<”, the file named after the “<” is read and its contents\nare added to the address-list for the alias.\n\nIn match, a trailing “*” on an alias will match just about anything appropriate.\n\nAn approximation of the way aliases are resolved at posting time is:\n\n1)     Build  a list of all addresses from the message to be delivered, eliminating duplicate\naddresses.\n\n2)     For those addresses in the message that have no host specified, perform alias  resolu‐\ntion.\n\n3)     For  each  line  in  the  alias  file, compare “alias” against all of the existing ad‐\ndresses.  If a match, remove the matched “alias” from the address list, and  add  each\nnew address in the address-group to the address list if it is not already on the list.\nThe alias itself is not usually output, rather the address-group that the  alias  maps\nto is output instead.  If “alias” is terminated with a “;” instead of a “:”, then both\nthe “alias” and the address are output in the correct format (with the alias quoted if\nnecessary and the address wrapped in <>).\n\nSince  the  mh-alias  file is read line by line, forward references work, but backward refer‐\nences are not recognized.\n",
            "subsections": [
                {
                    "name": "Example Alias File",
                    "content": "</etc/nmh/BBoardAliases\nsgroup: fred, fear, freida\nfred: frated@UCI.example\nb-people: Blind List: bill, betty\nUnix-committee: <unix.aliases\nnews.*: news\n\nThe  first  line  says  that  more  aliases  should  immediately  be  read  from   the   file\n/etc/nmh/BBoardAliases.   Next,  “sgroup”  is defined as an alias for three names, and one of\nthem, “fred”, is a forward reference to another alias for “frated@UCI.example”.\n\nThe alias “b-people” is a blind list which includes the addresses  “bill”  and  “betty”;  the\nmessage  will  be  delivered to those addresses, but the message header will show only “Blind\nList: ;” (not the addresses).  The alias must not be terminated with,  or  contain,  a  semi‐\ncolon.  Note that blind lists are not supported with the sendmail/pipe mail transport method.\n\nThe  definition  of  “Unix-committee” is given by reading the file unix.aliases in the user's\nnmh directory.\n\nLastly, “news.anything” is aliased to “news”; the full stop is just another  literal  charac‐\nter.\n"
                }
            ]
        },
        "PROFILE COMPONENTS": {
            "content": "Aliasfile:          Default alias file.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/nmh/MailAliases\nSystem-wide default alias file.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ali(1), send(1), whom(1), getgrent(3), getpwent(3), post(8)\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Although  the  forward-referencing  semantics of mh-alias files prevent recursion, the alias-\nfile directive may defeat this.  Since the number of file descriptors is finite,  such  infi‐\nnite recursion will terminate with a meaningless diagnostic when all the fds are used up.\n\nEarlier  versions  of  this man page showed a semicolon at the end of the blind list example.\nThat caused the preceding alias to not be expanded.  There must not be a semicolon at the end\nof,  or  within,  the  address  group of a blind list.  post will append the semicolon to the\nblind list name.\n\n\n\nnmh-1.7.1                                    2014-04-18                                MH-ALIAS(5mh)",
            "subsections": []
        }
    },
    "summary": "mh-alias - format of nmh email-address alias files",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "ali",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ali/1/json"
        },
        {
            "name": "send",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/send/1/json"
        },
        {
            "name": "whom",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/whom/1/json"
        },
        {
            "name": "getgrent",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/getgrent/3/json"
        },
        {
            "name": "getpwent",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/getpwent/3/json"
        },
        {
            "name": "post",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/post/8/json"
        }
    ]
}