BSD 4_3_Tahoe release
[unix-history] / usr / src / usr.lib / sendmail / cf / m4 / nstcpm.m4
CommitLineData
ca67e7b4
C
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.19 (Berkeley) 3/31/88
12#
13divert(0)
14############################################################
15############################################################
16#####
17##### Arpanet TCP 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.
22#####
23##### This mailer is to be used with the Berkeley Name Server.
24#####
25############################################################
26############################################################
27
28Mtcp, P=[IPC], F=mDFMueXLC, S=14, R=24, A=IPC $h, E=\r\n
29
30S14
31
32# pass <route-addr>'s through
33R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
34
35# map colons to dots everywhere
36R$*:$* $1.$2 map colons to dots
37
38# output local host in user@host.BERKELEY.EDU syntax
39R$- $1<@$w> user w/o host
40R$+<@$=w> $:$1<@$w> this host
41R$+<@$-> $:$1<@$[$2$]> canonicalize into dom
42R$+<@$-> $:$1<@$2.$D> if nameserver fails
43R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok
44R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway
45
46# if not local, and not a "fake" domain, ask the nameserver
47R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
48R$+<@[$+]> $@$1<@[$2]> already ok
49
50# output internal ("fake") domains as "user%host@relay"
51
52R$+<@$+.CSNET> $@$1%$2.CSNET<@relay.cs.net> user@host.CSNET
53R$+<@$+.BITNET> $@$1%$2.BITNET<@jade.berkeley.edu> user@host.BITNET
54R$+<@$+.UUCP> $@$2!$1<@$w> user@host.UUCP
55
56
57S24
58
59# put in <> kludge
60R$*<$*>$* $1$2$3 defocus
61R$* $:$>3$1 now canonical form
62
63# pass <route-addr>'s through
64R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
65
66# map colons to dots everywhere.....
67R$*:$* $1.$2 map colons to dots
68
69# output local host in user@host.domain syntax
70R$- $1<@$w> user w/o host
71R$+<@$=w> $:$1<@$w> this host
72R$+<@$-> $:$1<@$[$2$]> canonicalize into dom
73R$+<@$-> $:$1<@$2.$D> if nameserver fails
74R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok
75R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway
76
77# if not local, and not a "fake" domain, ask the nameserver
78R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
79R$+<@[$+]> $@$1<@[$2]> already ok
80
81# Hide fake domains behind gateways
82
83R$+<@$+.CSNET> $@$1%$2.CSNET<@relay.cs.net> user@host.CSNET
84R$+<@$+.BITNET> $@$1<@$2.BITNET> user@host.BITNET
85R$+<@$+.UUCP> $@$2!$1 user@host.UUCP
86