3 # Copyright (c) 1998 Sendmail, Inc. All rights reserved.
4 # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
5 # Copyright (c) 1988, 1993
6 # The Regents of the University of California. All rights reserved.
8 # By using this file, you agree to the terms and conditions set
9 # forth in the LICENSE file which can be found at the top level of
10 # the sendmail distribution.
15 VERSIONID(`@(#)nullrelay.m4 8.19 (Berkeley) 5/19/1998')
18 # This configuration applies only to relay-only hosts. They send
19 # all mail to a hub without consideration of the address syntax
20 # or semantics, except for adding the hub qualification to the
23 # This is based on a prototype done by Bryan Costales of ICSI.
26 ######################################################################
27 ######################################################################
31 ######################################################################
32 ######################################################################
34 ###########################################
35 ### Rulset 3 -- Name Canonicalization ###
36 ###########################################
42 # strip group: syntax (not inside angle brackets!) and trailing semicolon
43 R$* $: $1 <@> mark addresses
44 R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
45 R$* :: $* <@> $: $1 :: $2 unmark node::addr
46 R:`include': $* <@> $: :`include': $1 unmark :`include':...
47 R$* : $* <@> $: $2 strip colon if marked
49 R$* ; $1 strip trailing semi
50 R$* < $* ; > $1 < $2 > bogus bracketed semi
52 # null input now results from list:; syntax
55 # basic textual canonicalization -- note RFC733 heuristic here
56 R$* $: < $1 > housekeeping <>
57 R$+ < $* > < $2 > strip excess on left
58 R< $* > $+ < $1 > strip excess on right
59 R<> $@ < @ > MAIL FROM:<> case
60 R< $+ > $: $1 remove housekeeping <>
62 ifdef(`_NO_CANONIFY_', `dnl',
63 `# eliminate local host if present
64 R@ $=w $=: $+ $@ @ $M $2 $3 @thishost ...
65 R@ $+ $@ @ $1 @somewhere ...
67 R$=E @ $=w $@ $1 @ $2 leave exposed
68 R$+ @ $=w $@ $1 @ $M ...@thishost
69 R$+ @ $+ $@ $1 @ $2 ...@somewhere
71 R$=w ! $=E $@ $2 @ $1 leave exposed
72 R$=w ! $+ $@ $2 @ $M thishost!...
73 R$+ ! $+ $@ $1 ! $2 @ $M somewhere ! ...
75 R$=E % $=w $@ $1 @ $2 leave exposed
76 R$+ % $=w $@ $1 @ $M ...%thishost
77 R$+ % $+ $@ $1 @ $2 ...%somewhere
79 R$=E $@ $1 @ $j leave exposed
80 R$+ $@ $1 @ $M unadorned user')
83 ######################################
84 ### Ruleset 0 -- Parse Address ###
85 ######################################
89 R$*:;<@> $#error $@ USAGE $: "List:; syntax illegal for recipient addresses"
91 # pass everything else to a relay host
92 R$* $#_RELAY_ $@ $H $: $1
95 ##################################################
96 ### Ruleset 4 -- Final Output Post-rewriting ###
97 ##################################################
100 R$* <@> $@ handle <> and list:;
102 # strip trailing dot off before passing to nullclient relay
106 ######################################################################
107 ######################################################################
109 `##### MAILER DEFINITIONS'
111 ######################################################################
112 ######################################################################