]> git.sur5r.net Git - openldap/blob - clients/mail500/sendmail.cf
Add comment to top of sendmail.cf to discourage directory mucking
[openldap] / clients / mail500 / sendmail.cf
1 #
2 # It's recommended use Sendmail's m4 configuration system to avoid
3 # mucking directly with .cf files
4 #
5
6 # Mostly rfc1123 compliant sendmail.cf
7 #
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.
12 #
13 DWtotalrecall
14 Dw$W.rs.itd.umich.edu
15
16 DBcunyvm.cuny.edu
17 DUdestroyer.rs.itd.umich.edu
18
19 DV2.2
20 De$j sendmail ($v/$V) ready at $b
21 Dj$w
22 DlFrom $g $d
23 Dnmailer-daemon
24 Do.:%@!^=/[]
25 Dq$?x\"$x\" <$g>$|$g$.
26
27 OA/etc/aliases
28 OQ/var/spool/mqueue
29 OH/usr/lib/sendmail.hf
30 OS/usr/lib/sendmail.st
31 OP
32 OD
33 OX10
34 Ox5
35 Ou1
36 Og1
37 Odb
38 OF0600
39 OL9
40 Oo
41 Or15m
42 Os
43 OT3d
44
45 H?P?Return-Path: <$g>
46 HReceived: $?sfrom $s $.by $j ($v/$V)
47         $?rwith $r $.id $i; $b
48 H?D?Resent-Date: $a
49 H?F?Resent-From: $q
50 H?M?Resent-Message-Id: <$t.$i@$j>
51 H?M?Message-Id: <$t.$i@$j>
52 H?D?Date: $a
53 H?x?Full-Name: $x
54 H?F?From: $q
55
56 Troot uucp daemon
57
58 Pspecial-delivery=100
59 Pfirst-class=0
60 Pjunk=-100
61
62 # Organization:
63 #
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
71 #                 left as they are
72 #               * unfocused addresses are envelope addresses, and should
73 #                 be converted to the mailers format
74 #       ruleset 4
75 #               remove focus on all addresses
76
77 # All addresses are passed through this rule. It functions by finding
78 # the host to delivery to, and marking it with <>
79 S3
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...
89
90 # Find the "next hop" in normal rfc822 syntax. These rules
91 # all return upon marking the next hop with <>
92 S5
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>
96
97 # Focus bang style addresses. Won't change already focused addresses.
98 # Strips .uucp in bang paths, and converts domain syntax to rfc822 adresses.
99 S6
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
103
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"
106 S0
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
116 R$+                                $#local$:$1
117
118 # Find the delivery address. Convert to standard-internal form,
119 # remove local name.
120 S7
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
124
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.
128 S8
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
133 R$+                             $: $>3$1                refocus
134
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.
137 S9
138 R$*<@$w>$*                         $>10$1<@>$2          remove local name
139 R<$W!>$+                           $>10<!>$1
140 R<@umich.edu>$*:$*                 $>10<@>$1:$2
141 R$+%$+<@umich.edu>                 $>10$1%$2<@>
142 R$+!$+<@umich.edu>                 $>10$1!$2<@>
143
144 # Called only from above. Refocus and loop.
145 S10
146 R<@>,$+                            $>3$1
147 R<@>:$+                            $>3$1
148 R$+<@>                             $>3$1
149 R<!>$+                             $>3$1
150 R$*<$+>$*                       $: $>7$1<$2>$3
151
152 # Convert domain names to uucp names, and refocus
153 S11
154 #R$*<@inquiry.org>$*                    $: $>8$1@inquiry$2
155
156 # Route uucp addresses, if we're not connected to them. We rely on the
157 # domain-path operator to down case addresses.
158 S12
159 R<$+!>$+                        $: <${$1$}!>$2          pathalias route
160 R<$+!$+!>$+                        <$1!>$2!$3           <a!b!>c -> <a!>b!c
161
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
170
171 # UUCP mailers require that the sender be in ! format.
172 # XXX Do we add our name to other people's paths?
173 S13
174 R$*<@$+>$*                      $: $>8$1@$2$3
175 #R<$w!>$+                       $@ <$W!>$1
176 R<$+!>$+                        $@ <$1!>$2
177 R$+:$*;                         $@ $1:$2;
178 R<>                             $@
179 #R$+                            $@ <$W!>$1
180 R$+                             $@ <$w!>$1
181
182 # Only add our name to local mail. Anything that's focused, leave alone.
183 S14
184 R$*<$+>$*                       $@ $1<$2>$3
185 R$+:$*;                         $@ $1:$2;
186 #R$+                            $@ <$W!>$1
187 R$+                             $@ <$w!>$1
188
189 # SMTP mailers require that addresses be in rfc822 format. If there's no
190 # @ in the address, add one.
191 S15
192 R<$W!>$+                           $1<@$w>
193 R<$-.$+!>$+                        $3<@$1.$2>
194 R$*<@$+>$*                      $@ $1<@$2>$3
195 R<$+!>$+                        $@ $1!$2<@$w>
196 R$+:$*;                         $@ $1:$2;
197 R<>                             $@
198 R$+                             $@ $1<@$w>
199
200 # Local and prog mailer
201 S16
202 R$+                             $@ $1
203
204 #
205 # Called on all outgoing addresses. Used to remove the <> focus
206 #
207 S4
208 R$*<$+>$*                       $@ $1$2$3               defocus