Sync usage with man page.
[netbsd-mini2440.git] / usr.sbin / sendmail / cf / m4 / nstcpm.m4
blob8ade7721ab3b299887ab98c1000fc2e9ead70da0
1 divert(10)
3 #  Sendmail
4 #  Copyright (c) 1983  Eric P. Allman
5 #  Berkeley, California
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.
11 #       @(#)nstcpm.m4   1.21 (Berkeley) 1/3/89
13 divert(0)
14 ############################################################
15 ############################################################
16 #####
17 #####           Internet SMTP Mailer specification
18 #####
19 #####   Messages processed by this specification are assumed to leave
20 #####   the local domain -- hence, they must be canonical according to
21 #####   RFC822 etc.  This means that machines not registered with
22 #####   the NIC must be hidden behind our Internet relay.
23 #####
24 ############################################################
25 ############################################################
27 Mtcp,   P=[IPC], F=mDFMueXLC, S=14, R=24, A=IPC $h, E=\r\n
29 S14
31 # pass <route-addr>'s through
32 R<@$+>$*                $@<@$[$1$]>$2                   resolve <route-addr>
34 # map colons to dots everywhere
35 R$*:$*                  $1.$2                           map colons to dots
37 # output local host in user@host.domain syntax
38 R$-                     $1<@$w>                         user w/o host
39 R$+<@$=w>               $:$1<@$w>                       this host
40 R$+<@$->                $:$1<@$[$2$]>                   canonicalize into dom
41 R$+<@$->                $:$1<@$2.$D>                    if nameserver fails
42 R$+<@$=N.$D>            $@$1<@$2.$D>                    nic-reg hosts are ok
43 R$+<@$*.$D>             $@$1%$2.$D<@$A>                 else -> u%h@gateway
45 # if not local, and not a "fake" domain, ask the nameserver
46 R$+<@$+.$~I>            $@$1<@$[$2.$3$]>                user@host.domain
47 R$+<@[$+]>              $@$1<@[$2]>                     already ok
49 # output internal ("fake") domains as "user%host@relay"
51 ifdef(`BITNET_RELAY',
52 R$+<@$+.BITNET>         $@$1%$2.BITNET<@$B>             user@host.BITNET)
53 ifdef(`CSNET_RELAY',
54 R$+<@$+.CSNET>          $@$1%$2.CSNET<@$C>              user@host.CSNET)
55 R$+<@$+.UUCP>           $@$2!$1<@$w>                    user@host.UUCP
58 S24
60 # put in <> kludge
61 R$*<$*>$*               $1$2$3                          defocus
62 R$*                     $:$>3$1                         now canonical form
64 # pass <route-addr>'s through
65 R<@$+>$*                $@<@$[$1$]>$2                   resolve <route-addr>
67 # map colons to dots everywhere.....
68 R$*:$*                  $1.$2                           map colons to dots
70 # output local host in user@host.domain syntax
71 R$-                     $1<@$w>                         user w/o host
72 R$+<@$=w>               $:$1<@$w>                       this host
73 R$+<@$->                $:$1<@$[$2$]>                   canonicalize into dom
74 R$+<@$->                $:$1<@$2.$D>                    if nameserver fails
75 R$+<@$=N.$D>            $@$1<@$2.$D>                    nic-reg hosts are ok
76 R$+<@$*.$D>             $@$1%$2.$D<@$A>                 else -> u%h@gateway
78 # if not local, and not a "fake" domain, ask the nameserver
79 R$+<@$+.$~I>            $@$1<@$[$2.$3$]>                user@host.domain
80 R$+<@[$+]>              $@$1<@[$2]>                     already ok
82 # Hide fake domains behind relays
84 ifdef(`BITNET_RELAY',
85 R$+<@$+.BITNET>         $@$1%$2.BITNET<@$B>             user@host.BITNET)
86 ifdef(`CSNET_RELAY',
87 R$+<@$+.CSNET>          $@$1%$2.CSNET<@$C>              user@host.CSNET)
88 R$+<@$+.UUCP>           $@$2!$1                         user@host.UUCP