1divert(-1) 2# 3# Copyright (c) 1983, 1995 Eric P. Allman 4# Copyright (c) 1988, 1993 5# The Regents of the University of California. All rights reserved. 6# 7# %sccs.include.redist.sh% 8# 9divert(0) 10 11VERSIONID(`@(#)nullrelay.m4 8.8 (Berkeley) 04/21/95') 12 13# 14# This configuration applies only to relay-only hosts. They send 15# all mail to a hub without consideration of the address syntax 16# or semantics, except for adding the hub qualification to the 17# addresses. 18# 19# This is based on a prototype done by Bryan Costales of ICSI. 20# 21 22###################################################################### 23###################################################################### 24##### 25##### REWRITING RULES 26##### 27###################################################################### 28###################################################################### 29 30########################################### 31### Rulset 3 -- Name Canonicalization ### 32########################################### 33S3 34 35# handle null input and list syntax (translate to <@> special case) 36R$@ $@ <@> 37R$*:;$* $@ $1 :; <@> 38 39# basic textual canonicalization -- note RFC733 heuristic here 40R$*<$*>$*<$*>$* $2$3<$4>$5 strip multiple <> <> 41R$*<$*<$+>$*>$* <$3>$5 2-level <> nesting 42R$*<>$* $@ <@> MAIL FROM:<> case 43R$*<$+>$* $2 basic RFC821/822 parsing 44 45ifdef(`_NO_CANONIFY_', `dnl', 46`# eliminate local host if present 47R@ $=w $=: $+ $@ @ $M $2 $3 @thishost ... 48R@ $+ $@ @ $1 @somewhere ... 49 50R$+ @ $=w $@ $1 @ $M ...@thishost 51R$+ @ $+ $@ $1 @ $2 ...@somewhere 52 53R$=w ! $+ $@ $2 @ $M thishost!... 54R$+ ! $+ $@ $1 ! $2 @ $M somewhere ! ... 55 56R$+ % $=w $@ $1 @ $M ...%thishost 57R$+ % $+ $@ $1 @ $2 ...%somewhere 58 59R$+ $@ $1 @ $M unadorned user') 60 61 62###################################### 63### Ruleset 0 -- Parse Address ### 64###################################### 65 66S0 67 68R$*:;<@> $#error $@ USAGE $: "list:; syntax illegal for recipient addresses" 69 70# pass everything else to a relay host 71R$* $#_RELAY_ $@ $H $: $1 72 73# 74###################################################################### 75###################################################################### 76##### 77`##### MAILER DEFINITIONS' 78##### 79###################################################################### 80###################################################################### 81undivert(7)dnl 82