Annotation of 43BSDTahoe/usr.lib/sendmail/cf/m4/rule3.m4, revision 1.1

1.1     ! root        1: divert(10)
        !             2: #
        !             3: #  Sendmail
        !             4: #  Copyright (c) 1983  Eric P. Allman
        !             5: #  Berkeley, California
        !             6: #
        !             7: #  Copyright (c) 1983 Regents of the University of California.
        !             8: #  All rights reserved.  The Berkeley software License Agreement
        !             9: #  specifies the terms and conditions for redistribution.
        !            10: #
        !            11: #      @(#)rule3.m4    1.16 (Berkeley) 4/8/88
        !            12: #
        !            13: divert(0)
        !            14: ###########################
        !            15: #  Name Canonicalization  #
        !            16: ###########################
        !            17: S3
        !            18: 
        !            19: # handle "from:<>" special case
        !            20: R<>                    $@@                             turn into magic token
        !            21: 
        !            22: # basic textual canonicalization -- note RFC733 heuristic here
        !            23: R$*<$*<$*<$+>$*>$*>$*  $4                              3-level <> nesting
        !            24: R$*<$*<$+>$*>$*                $3                              2-level <> nesting
        !            25: R$*<$+>$*              $2                              basic RFC821/822 parsing
        !            26: R$+ at $+              $1@$2                           "at" -> "@" for RFC 822
        !            27: 
        !            28: # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
        !            29: R@$+,$+                        @$1:$2                          change all "," to ":"
        !            30: 
        !            31: # localize and dispose of route-based addresses
        !            32: R@$+:$+                        $@$>6<@$1>:$2                   handle <route-addr>
        !            33: 
        !            34: # more miscellaneous cleanup
        !            35: R$+                    $:$>8$1                         host dependent cleanup
        !            36: R$+:$*;@$+             $@$1:$2;@$3                     list syntax
        !            37: R$+:$*;                        $@$1:$2;                        list syntax
        !            38: R$+@$+                 $:$1<@$2>                       focus on domain
        !            39: R$+<$+@$+>             $1$2<@$3>                       move gaze right
        !            40: R$+<@$+>               $@$>6$1<@$2>                    already canonical
        !            41: 
        !            42: # convert old-style addresses to a domain-based address
        !            43: R$+^$+                 $1!$2                           convert ^ to !
        !            44: R$-!$+                 $@$>6$2<@$1.UUCP>               resolve uucp names
        !            45: R$+.$-!$+              $@$>6$3<@$1.$2>                 domain uucps
        !            46: R$+!$+                 $@$>6$2<@$1.UUCP>               uucp subdomains
        !            47: R$-:$+                 $@$>6$2<@$1>                    host:user
        !            48: R$-=$+                 $@$>6$2<@$1.BITNET>             resolve bitnet names
        !            49: R$+%$+                 $:$>9$1%$2                      user%host
        !            50: R$+<@$+>               $@$>6$1<@$2>                    already canonical
        !            51: R$-.$+                 $@$>6$2<@$1>                    host.user
        !            52: 
        !            53: 
        !            54: #################################
        !            55: #   special local conversions   #
        !            56: #################################
        !            57: 
        !            58: S6
        !            59: R$*<@$=w>$*            $:$1<@$w>$3                     get into u@$w form
        !            60: R$*<@$=w.$D>$*         $:$1<@$w>$3
        !            61: R$*<@$=w.EDU>$*                $:$1<@$w>$3
        !            62: R$*<@$=U.UUCP>$*       $:$1<@$w>$3
        !            63: 
        !            64: ################################
        !            65: #   Change rightmost % to @.   #
        !            66: ################################
        !            67: 
        !            68: S9
        !            69: R$*%$*                 $1@$2                           First make them all @'s.
        !            70: R$*@$*@$*              $1%$2@$3                        Undo all but the last.
        !            71: R$*@$*                 $@$1<@$2>                       Put back the brackets.
        !            72: 

unix.superglobalmegacorp.com

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