2 # It's recommended use Sendmail's m4 configuration system to avoid
3 # mucking directly with .cf files
6 # Mostly rfc1123 compliant sendmail.cf
8 # Mail sendmail-admins-request@itd.umich.edu to join
9 # sendmail-admins@itd.umich.edu. sendmail-admins carries information
10 # regarding this sendmail.cf, including announcements of changes
11 # and discussions of interest to admins.
17 DUdestroyer.rs.itd.umich.edu
20 De$j sendmail ($v/$V) ready at $b
25 Dq$?x\"$x\" <$g>$|$g$.
29 OH/usr/lib/sendmail.hf
30 OS/usr/lib/sendmail.st
46 HReceived: $?sfrom $s $.by $j ($v/$V)
47 $?rwith $r $.id $i; $b
50 H?M?Resent-Message-Id: <$t.$i@$j>
51 H?M?Message-Id: <$t.$i@$j>
64 # ruleset 3 and friends
65 # focus addresses, don't screw with them
66 # ruleset 0 and friends
67 # beat the hell out of addresses, convert them to
68 # their deliverable form
69 # mailers and associated rulesets
70 # * focused addresses are body addresses, and should be
72 # * unfocused addresses are envelope addresses, and should
73 # be converted to the mailers format
75 # remove focus on all addresses
77 # All addresses are passed through this rule. It functions by finding
78 # the host to delivery to, and marking it with <>
80 R$*<$+>$* $2 remove comments
81 R$+:$*; $@ $1:$2; done if list
82 R$*@$+ $: $>5$1@$2 focus rfc822 addresses
83 R$+!$+ $: $>6$1!$2 focus uucp
84 R$*<@$+>$* $: $1<@$[$2$]>$3 canonicalize
85 R$*<$+>$* $@ $1<$2>$3 done if focused
86 R$+%$+ $: $1@$2 a%b -> a@b
87 R$+@$+%$+ $1%$2@$3 a@b%c -> a%b@c
88 R$+@$+ $: $>3$1@$2 try again...
90 # Find the "next hop" in normal rfc822 syntax. These rules
91 # all return upon marking the next hop with <>
93 R@$+,@$+:$+ $@ <@$1>,@$2:$3 @a,@b:@c -> <@a>,@b:c
94 R@$+:$+ $@ <@$1>:$2 @a:b -> <@a>:b
95 R$+@$+ $@ $1<@$2> a@b -> a<@b>
97 # Focus bang style addresses. Won't change already focused addresses.
98 # Strips .uucp in bang paths, and converts domain syntax to rfc822 adresses.
100 R$*<$+>$* $@ $1<$2>$3 already focused
101 R$+!$+ $: <$1!>$2 a!b -> <a!>b
102 R<$+.uucp!>$+ <$1!>$2 <a.uucp!>b -> <a!>b
104 # Find a mailer. This involves finding the "real" host to deliver to,
105 # by removing our local name, and/or doing a "domain forward"
107 R$+ $: $>7$1 deliverable format
108 R$*<$+>$* $: $>11$1<$2>$3 domain forward
109 R<$+!>$+ $: $>12<$1!>$2 route uucp
110 R$*<@$+.bitnet>$* $#inet$@$B$:$1<@$2.bitnet>$3
111 R$*<@umich.edu>$* $#mail500$@umich.edu$:<$1>
112 R$*<@itd.umich.edu>$* $#mail500$@itd.umich.edu$:<$1>
113 #R<$+!>$+ $#uux$@$U$:<$1!>$2
114 R<$+!>$+ $#unet$@$U$:<$1!>$2
115 R$*<@$+>$* $#inet$@$2$:$1<@$2>$3
118 # Find the delivery address. Convert to standard-internal form,
121 R<$-.$+!>$+ $3<@$1.$2> <a.b!>c -> c<@a.b>
122 R$*<@$-.uucp>$* $>8$1@$2.uucp$3 *.uucp to !
123 R$*<$+>$* $: $>9$1<$2>$3 strip local name
125 # Convert rfc822 syntax to a uucp "bang path". This works well
126 # on normal a@b address and route-addrs. It will also do something
127 # to list syntax address, but it's not clear how correct it is.
129 R@$+,@$+:$+ @$1!$2:$3 @a,@b:c -> @a!b:c
130 R@$+:$+@$+ $1!$3!$2 @a:b@c -> a!c!b
131 R@$+:$+!$+ $1!$2!$3 @a:b!c -> a!b!c
132 R$+@$+ $2!$1 a@b -> b!c
135 # Remove local names. You won't see things like a.b!u or u@b.uucp.
136 # Add new rules here to accept more than just the default locally.
138 R$*<@$w>$* $>10$1<@>$2 remove local name
140 R<@umich.edu>$*:$* $>10<@>$1:$2
141 R$+%$+<@umich.edu> $>10$1%$2<@>
142 R$+!$+<@umich.edu> $>10$1!$2<@>
144 # Called only from above. Refocus and loop.
150 R$*<$+>$* $: $>7$1<$2>$3
152 # Convert domain names to uucp names, and refocus
154 #R$*<@inquiry.org>$* $: $>8$1@inquiry$2
156 # Route uucp addresses, if we're not connected to them. We rely on the
157 # domain-path operator to down case addresses.
159 R<$+!>$+ $: <${$1$}!>$2 pathalias route
160 R<$+!$+!>$+ <$1!>$2!$3 <a!b!>c -> <a!>b!c
162 Muux, P=/usr/bin/uux, F=DFMhu, S=13, R=14,
163 A=uux - -gC -b -r -a$f $h!rmail ($u)
164 Munet, P=[IPC], F=mDFMhuX, S=13, R=14, A=IPC $h, E=\r\n
165 Minet, P=[IPC], F=mDFMuX, S=15, R=15, A=IPC $h, E=\r\n
166 Mlocal, P=/bin/mail, F=rlsDFMmn, S=16, R=16, A=mail -d $u
167 Mprog, P=/bin/sh, F=lsDFMe, S=16, R=16, A=sh -c $u
168 Mmail500, P=/usr/local/etc/mail500, F=DFMSmnXuh,
169 A=mail500 -f $f -h $h -m $n@$w $u
171 # UUCP mailers require that the sender be in ! format.
172 # XXX Do we add our name to other people's paths?
174 R$*<@$+>$* $: $>8$1@$2$3
182 # Only add our name to local mail. Anything that's focused, leave alone.
184 R$*<$+>$* $@ $1<$2>$3
189 # SMTP mailers require that addresses be in rfc822 format. If there's no
190 # @ in the address, add one.
193 R<$-.$+!>$+ $3<@$1.$2>
194 R$*<@$+>$* $@ $1<@$2>$3
195 R<$+!>$+ $@ $1!$2<@$w>
200 # Local and prog mailer
205 # Called on all outgoing addresses. Used to remove the <> focus
208 R$*<$+>$* $@ $1$2$3 defocus