Oh GACK! src-clean doesn't quite work that easily since cleandist rebuilds the
[unix-history] / usr.sbin / sendmail / cf / m4 / nstcpm.m4
CommitLineData
15637ed4
RG
1divert(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#
13divert(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
27Mtcp, P=[IPC], F=mDFMueXLC, S=14, R=24, A=IPC $h, E=\r\n
28
29S14
30
31# pass <route-addr>'s through
32R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
33
34# map colons to dots everywhere
35R$*:$* $1.$2 map colons to dots
36
37# output local host in user@host.domain syntax
38R$- $1<@$w> user w/o host
39R$+<@$=w> $:$1<@$w> this host
40R$+<@$-> $:$1<@$[$2$]> canonicalize into dom
41R$+<@$-> $:$1<@$2.$D> if nameserver fails
42R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok
43R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway
44
45# if not local, and not a "fake" domain, ask the nameserver
46R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
47R$+<@[$+]> $@$1<@[$2]> already ok
48
49# output internal ("fake") domains as "user%host@relay"
50
51ifdef(`BITNET_RELAY',
52R$+<@$+.BITNET> $@$1%$2.BITNET<@$B> user@host.BITNET)
53ifdef(`CSNET_RELAY',
54R$+<@$+.CSNET> $@$1%$2.CSNET<@$C> user@host.CSNET)
55R$+<@$+.UUCP> $@$2!$1<@$w> user@host.UUCP
56
57
58S24
59
60# put in <> kludge
61R$*<$*>$* $1$2$3 defocus
62R$* $:$>3$1 now canonical form
63
64# pass <route-addr>'s through
65R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
66
67# map colons to dots everywhere.....
68R$*:$* $1.$2 map colons to dots
69
70# output local host in user@host.domain syntax
71R$- $1<@$w> user w/o host
72R$+<@$=w> $:$1<@$w> this host
73R$+<@$-> $:$1<@$[$2$]> canonicalize into dom
74R$+<@$-> $:$1<@$2.$D> if nameserver fails
75R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok
76R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway
77
78# if not local, and not a "fake" domain, ask the nameserver
79R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
80R$+<@[$+]> $@$1<@[$2]> already ok
81
82# Hide fake domains behind relays
83
84ifdef(`BITNET_RELAY',
85R$+<@$+.BITNET> $@$1%$2.BITNET<@$B> user@host.BITNET)
86ifdef(`CSNET_RELAY',
87R$+<@$+.CSNET> $@$1%$2.CSNET<@$C> user@host.CSNET)
88R$+<@$+.UUCP> $@$2!$1 user@host.UUCP
89