Commit | Line | Data |
---|---|---|
15637ed4 RG |
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 | # @(#)nstcpm.m4 1.21 (Berkeley) 1/3/89 | |
12 | # | |
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 | ############################################################ | |
26 | ||
27 | Mtcp, P=[IPC], F=mDFMueXLC, S=14, R=24, A=IPC $h, E=\r\n | |
28 | ||
29 | S14 | |
30 | ||
31 | # pass <route-addr>'s through | |
32 | R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr> | |
33 | ||
34 | # map colons to dots everywhere | |
35 | R$*:$* $1.$2 map colons to dots | |
36 | ||
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 | |
44 | ||
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 | |
48 | ||
49 | # output internal ("fake") domains as "user%host@relay" | |
50 | ||
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 | |
56 | ||
57 | ||
58 | S24 | |
59 | ||
60 | # put in <> kludge | |
61 | R$*<$*>$* $1$2$3 defocus | |
62 | R$* $:$>3$1 now canonical form | |
63 | ||
64 | # pass <route-addr>'s through | |
65 | R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr> | |
66 | ||
67 | # map colons to dots everywhere..... | |
68 | R$*:$* $1.$2 map colons to dots | |
69 | ||
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 | |
77 | ||
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 | |
81 | ||
82 | # Hide fake domains behind relays | |
83 | ||
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 | |
89 |