annotate test.cf @ 0:96a9758165cd original

Initial revision
author carl
date Tue, 20 Apr 2004 20:02:29 -0700
parents
children 15a7e942adec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a9758165cd Initial revision
carl
parents:
diff changeset
1 #
96a9758165cd Initial revision
carl
parents:
diff changeset
2 # Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
96a9758165cd Initial revision
carl
parents:
diff changeset
3 # All rights reserved.
96a9758165cd Initial revision
carl
parents:
diff changeset
4 # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
96a9758165cd Initial revision
carl
parents:
diff changeset
5 # Copyright (c) 1988, 1993
96a9758165cd Initial revision
carl
parents:
diff changeset
6 # The Regents of the University of California. All rights reserved.
96a9758165cd Initial revision
carl
parents:
diff changeset
7 #
96a9758165cd Initial revision
carl
parents:
diff changeset
8 # By using this file, you agree to the terms and conditions set
96a9758165cd Initial revision
carl
parents:
diff changeset
9 # forth in the LICENSE file which can be found at the top level of
96a9758165cd Initial revision
carl
parents:
diff changeset
10 # the sendmail distribution.
96a9758165cd Initial revision
carl
parents:
diff changeset
11 #
96a9758165cd Initial revision
carl
parents:
diff changeset
12 #
96a9758165cd Initial revision
carl
parents:
diff changeset
13
96a9758165cd Initial revision
carl
parents:
diff changeset
14 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
15 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
16 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
17 ##### SENDMAIL CONFIGURATION FILE
96a9758165cd Initial revision
carl
parents:
diff changeset
18 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
19 ##### built by root@ns.five-ten-sg.com on Wed Apr 14 20:41:48 PDT 2004
96a9758165cd Initial revision
carl
parents:
diff changeset
20 ##### in /usr/src/rh8/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
21 ##### using /usr/share/sendmail-cf/ as configuration include directory
96a9758165cd Initial revision
carl
parents:
diff changeset
22 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
23 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
24 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
25 ##### DO NOT EDIT THIS FILE! Only edit the source .mc file.
96a9758165cd Initial revision
carl
parents:
diff changeset
26 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
27 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
28 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
29
96a9758165cd Initial revision
carl
parents:
diff changeset
30 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
31 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
32
96a9758165cd Initial revision
carl
parents:
diff changeset
33 ##### linux setup for Red Hat Linux #####
96a9758165cd Initial revision
carl
parents:
diff changeset
34
96a9758165cd Initial revision
carl
parents:
diff changeset
35 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
36
96a9758165cd Initial revision
carl
parents:
diff changeset
37
96a9758165cd Initial revision
carl
parents:
diff changeset
38
96a9758165cd Initial revision
carl
parents:
diff changeset
39 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
40
96a9758165cd Initial revision
carl
parents:
diff changeset
41
96a9758165cd Initial revision
carl
parents:
diff changeset
42
96a9758165cd Initial revision
carl
parents:
diff changeset
43
96a9758165cd Initial revision
carl
parents:
diff changeset
44
96a9758165cd Initial revision
carl
parents:
diff changeset
45
96a9758165cd Initial revision
carl
parents:
diff changeset
46
96a9758165cd Initial revision
carl
parents:
diff changeset
47
96a9758165cd Initial revision
carl
parents:
diff changeset
48
96a9758165cd Initial revision
carl
parents:
diff changeset
49
96a9758165cd Initial revision
carl
parents:
diff changeset
50
96a9758165cd Initial revision
carl
parents:
diff changeset
51
96a9758165cd Initial revision
carl
parents:
diff changeset
52
96a9758165cd Initial revision
carl
parents:
diff changeset
53
96a9758165cd Initial revision
carl
parents:
diff changeset
54
96a9758165cd Initial revision
carl
parents:
diff changeset
55
96a9758165cd Initial revision
carl
parents:
diff changeset
56
96a9758165cd Initial revision
carl
parents:
diff changeset
57
96a9758165cd Initial revision
carl
parents:
diff changeset
58
96a9758165cd Initial revision
carl
parents:
diff changeset
59
96a9758165cd Initial revision
carl
parents:
diff changeset
60
96a9758165cd Initial revision
carl
parents:
diff changeset
61
96a9758165cd Initial revision
carl
parents:
diff changeset
62
96a9758165cd Initial revision
carl
parents:
diff changeset
63
96a9758165cd Initial revision
carl
parents:
diff changeset
64
96a9758165cd Initial revision
carl
parents:
diff changeset
65
96a9758165cd Initial revision
carl
parents:
diff changeset
66
96a9758165cd Initial revision
carl
parents:
diff changeset
67
96a9758165cd Initial revision
carl
parents:
diff changeset
68
96a9758165cd Initial revision
carl
parents:
diff changeset
69
96a9758165cd Initial revision
carl
parents:
diff changeset
70 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
71
96a9758165cd Initial revision
carl
parents:
diff changeset
72
96a9758165cd Initial revision
carl
parents:
diff changeset
73 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
74
96a9758165cd Initial revision
carl
parents:
diff changeset
75 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
76
96a9758165cd Initial revision
carl
parents:
diff changeset
77
96a9758165cd Initial revision
carl
parents:
diff changeset
78 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
79
96a9758165cd Initial revision
carl
parents:
diff changeset
80
96a9758165cd Initial revision
carl
parents:
diff changeset
81
96a9758165cd Initial revision
carl
parents:
diff changeset
82 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
83
96a9758165cd Initial revision
carl
parents:
diff changeset
84
96a9758165cd Initial revision
carl
parents:
diff changeset
85
96a9758165cd Initial revision
carl
parents:
diff changeset
86 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
87
96a9758165cd Initial revision
carl
parents:
diff changeset
88
96a9758165cd Initial revision
carl
parents:
diff changeset
89 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
90
96a9758165cd Initial revision
carl
parents:
diff changeset
91
96a9758165cd Initial revision
carl
parents:
diff changeset
92 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
93
96a9758165cd Initial revision
carl
parents:
diff changeset
94
96a9758165cd Initial revision
carl
parents:
diff changeset
95 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
96
96a9758165cd Initial revision
carl
parents:
diff changeset
97
96a9758165cd Initial revision
carl
parents:
diff changeset
98 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
99
96a9758165cd Initial revision
carl
parents:
diff changeset
100
96a9758165cd Initial revision
carl
parents:
diff changeset
101 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
102
96a9758165cd Initial revision
carl
parents:
diff changeset
103
96a9758165cd Initial revision
carl
parents:
diff changeset
104 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
105
96a9758165cd Initial revision
carl
parents:
diff changeset
106
96a9758165cd Initial revision
carl
parents:
diff changeset
107
96a9758165cd Initial revision
carl
parents:
diff changeset
108
96a9758165cd Initial revision
carl
parents:
diff changeset
109
96a9758165cd Initial revision
carl
parents:
diff changeset
110
96a9758165cd Initial revision
carl
parents:
diff changeset
111
96a9758165cd Initial revision
carl
parents:
diff changeset
112
96a9758165cd Initial revision
carl
parents:
diff changeset
113 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
114
96a9758165cd Initial revision
carl
parents:
diff changeset
115 # level 10 config file format
96a9758165cd Initial revision
carl
parents:
diff changeset
116 V10/Berkeley
96a9758165cd Initial revision
carl
parents:
diff changeset
117
96a9758165cd Initial revision
carl
parents:
diff changeset
118 # override file safeties - setting this option compromises system security,
96a9758165cd Initial revision
carl
parents:
diff changeset
119 # addressing the actual file configuration problem is preferred
96a9758165cd Initial revision
carl
parents:
diff changeset
120 # need to set this before any file actions are encountered in the cf file
96a9758165cd Initial revision
carl
parents:
diff changeset
121 #O DontBlameSendmail=safe
96a9758165cd Initial revision
carl
parents:
diff changeset
122
96a9758165cd Initial revision
carl
parents:
diff changeset
123 # default LDAP map specification
96a9758165cd Initial revision
carl
parents:
diff changeset
124 # need to set this now before any LDAP maps are defined
96a9758165cd Initial revision
carl
parents:
diff changeset
125 #O LDAPDefaultSpec=-h localhost
96a9758165cd Initial revision
carl
parents:
diff changeset
126
96a9758165cd Initial revision
carl
parents:
diff changeset
127 ##################
96a9758165cd Initial revision
carl
parents:
diff changeset
128 # local info #
96a9758165cd Initial revision
carl
parents:
diff changeset
129 ##################
96a9758165cd Initial revision
carl
parents:
diff changeset
130
96a9758165cd Initial revision
carl
parents:
diff changeset
131 # my LDAP cluster
96a9758165cd Initial revision
carl
parents:
diff changeset
132 # need to set this before any LDAP lookups are done (including classes)
96a9758165cd Initial revision
carl
parents:
diff changeset
133 #D{sendmailMTACluster}$m
96a9758165cd Initial revision
carl
parents:
diff changeset
134
96a9758165cd Initial revision
carl
parents:
diff changeset
135 Cwlocalhost
96a9758165cd Initial revision
carl
parents:
diff changeset
136 # file containing names of hosts for which we receive email
96a9758165cd Initial revision
carl
parents:
diff changeset
137 Fw/etc/mail/sendmail.cw
96a9758165cd Initial revision
carl
parents:
diff changeset
138
96a9758165cd Initial revision
carl
parents:
diff changeset
139 # my official domain name
96a9758165cd Initial revision
carl
parents:
diff changeset
140 # ... define this only if sendmail cannot automatically determine your domain
96a9758165cd Initial revision
carl
parents:
diff changeset
141 #Dj$w.Foo.COM
96a9758165cd Initial revision
carl
parents:
diff changeset
142
96a9758165cd Initial revision
carl
parents:
diff changeset
143 CP.
96a9758165cd Initial revision
carl
parents:
diff changeset
144
96a9758165cd Initial revision
carl
parents:
diff changeset
145 # "Smart" relay host (may be null)
96a9758165cd Initial revision
carl
parents:
diff changeset
146 DS
96a9758165cd Initial revision
carl
parents:
diff changeset
147
96a9758165cd Initial revision
carl
parents:
diff changeset
148
96a9758165cd Initial revision
carl
parents:
diff changeset
149 # operators that cannot be in local usernames (i.e., network indicators)
96a9758165cd Initial revision
carl
parents:
diff changeset
150 CO @ % !
96a9758165cd Initial revision
carl
parents:
diff changeset
151
96a9758165cd Initial revision
carl
parents:
diff changeset
152 # a class with just dot (for identifying canonical names)
96a9758165cd Initial revision
carl
parents:
diff changeset
153 C..
96a9758165cd Initial revision
carl
parents:
diff changeset
154
96a9758165cd Initial revision
carl
parents:
diff changeset
155 # a class with just a left bracket (for identifying domain literals)
96a9758165cd Initial revision
carl
parents:
diff changeset
156 C[[
96a9758165cd Initial revision
carl
parents:
diff changeset
157
96a9758165cd Initial revision
carl
parents:
diff changeset
158 # access_db acceptance class
96a9758165cd Initial revision
carl
parents:
diff changeset
159 C{Accept}OK RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
160
96a9758165cd Initial revision
carl
parents:
diff changeset
161
96a9758165cd Initial revision
carl
parents:
diff changeset
162 # Resolve map (to check if a host exists in check_mail)
96a9758165cd Initial revision
carl
parents:
diff changeset
163 Kresolve host -a<OKR> -T<TEMP>
96a9758165cd Initial revision
carl
parents:
diff changeset
164 C{ResOk}OKR
96a9758165cd Initial revision
carl
parents:
diff changeset
165
96a9758165cd Initial revision
carl
parents:
diff changeset
166
96a9758165cd Initial revision
carl
parents:
diff changeset
167 # Hosts for which relaying is permitted ($=R)
96a9758165cd Initial revision
carl
parents:
diff changeset
168 FR/etc/mail/relay-domains
96a9758165cd Initial revision
carl
parents:
diff changeset
169
96a9758165cd Initial revision
carl
parents:
diff changeset
170 # arithmetic map
96a9758165cd Initial revision
carl
parents:
diff changeset
171 Karith arith
96a9758165cd Initial revision
carl
parents:
diff changeset
172 # macro storage map
96a9758165cd Initial revision
carl
parents:
diff changeset
173 Kmacro macro
96a9758165cd Initial revision
carl
parents:
diff changeset
174 # possible values for TLS_connection in access map
96a9758165cd Initial revision
carl
parents:
diff changeset
175 C{tls}VERIFY ENCR
96a9758165cd Initial revision
carl
parents:
diff changeset
176
96a9758165cd Initial revision
carl
parents:
diff changeset
177
96a9758165cd Initial revision
carl
parents:
diff changeset
178
96a9758165cd Initial revision
carl
parents:
diff changeset
179
96a9758165cd Initial revision
carl
parents:
diff changeset
180
96a9758165cd Initial revision
carl
parents:
diff changeset
181 # dequoting map
96a9758165cd Initial revision
carl
parents:
diff changeset
182 Kdequote dequote
96a9758165cd Initial revision
carl
parents:
diff changeset
183
96a9758165cd Initial revision
carl
parents:
diff changeset
184 # class E: names that should be exposed as from this host, even if we masquerade
96a9758165cd Initial revision
carl
parents:
diff changeset
185 # class L: names that should be delivered locally, even if we have a relay
96a9758165cd Initial revision
carl
parents:
diff changeset
186 # class M: domains that should be converted to $M
96a9758165cd Initial revision
carl
parents:
diff changeset
187 # class N: domains that should not be converted to $M
96a9758165cd Initial revision
carl
parents:
diff changeset
188 #CL root
96a9758165cd Initial revision
carl
parents:
diff changeset
189 F{VirtHost}/etc/mail/virtual-host-domains
96a9758165cd Initial revision
carl
parents:
diff changeset
190
96a9758165cd Initial revision
carl
parents:
diff changeset
191 C{TrustAuthMech}LOGIN PLAIN
96a9758165cd Initial revision
carl
parents:
diff changeset
192 CR$={VirtHost}
96a9758165cd Initial revision
carl
parents:
diff changeset
193
96a9758165cd Initial revision
carl
parents:
diff changeset
194
96a9758165cd Initial revision
carl
parents:
diff changeset
195
96a9758165cd Initial revision
carl
parents:
diff changeset
196 # my name for error messages
96a9758165cd Initial revision
carl
parents:
diff changeset
197 DnMAILER-DAEMON
96a9758165cd Initial revision
carl
parents:
diff changeset
198
96a9758165cd Initial revision
carl
parents:
diff changeset
199
96a9758165cd Initial revision
carl
parents:
diff changeset
200 CPREDIRECT
96a9758165cd Initial revision
carl
parents:
diff changeset
201
96a9758165cd Initial revision
carl
parents:
diff changeset
202 # Access list database (for spam stomping)
96a9758165cd Initial revision
carl
parents:
diff changeset
203 Kaccess hash -T<TMPF> /etc/mail/access.db
96a9758165cd Initial revision
carl
parents:
diff changeset
204
96a9758165cd Initial revision
carl
parents:
diff changeset
205 # Mailer table (overriding domains)
96a9758165cd Initial revision
carl
parents:
diff changeset
206 Kmailertable hash /etc/mail/mailertable.db
96a9758165cd Initial revision
carl
parents:
diff changeset
207
96a9758165cd Initial revision
carl
parents:
diff changeset
208 # Virtual user table (maps incoming users)
96a9758165cd Initial revision
carl
parents:
diff changeset
209 Kvirtuser hash /etc/mail/virtusertable.db
96a9758165cd Initial revision
carl
parents:
diff changeset
210
96a9758165cd Initial revision
carl
parents:
diff changeset
211 # Generics table (mapping outgoing addresses)
96a9758165cd Initial revision
carl
parents:
diff changeset
212 Kgenerics hash /etc/mail/genericstable.db
96a9758165cd Initial revision
carl
parents:
diff changeset
213
96a9758165cd Initial revision
carl
parents:
diff changeset
214 # Configuration version number
96a9758165cd Initial revision
carl
parents:
diff changeset
215 DZ8.12.8
96a9758165cd Initial revision
carl
parents:
diff changeset
216
96a9758165cd Initial revision
carl
parents:
diff changeset
217
96a9758165cd Initial revision
carl
parents:
diff changeset
218 ###############
96a9758165cd Initial revision
carl
parents:
diff changeset
219 # Options #
96a9758165cd Initial revision
carl
parents:
diff changeset
220 ###############
96a9758165cd Initial revision
carl
parents:
diff changeset
221
96a9758165cd Initial revision
carl
parents:
diff changeset
222 # strip message body to 7 bits on input?
96a9758165cd Initial revision
carl
parents:
diff changeset
223 O SevenBitInput=False
96a9758165cd Initial revision
carl
parents:
diff changeset
224
96a9758165cd Initial revision
carl
parents:
diff changeset
225 # 8-bit data handling
96a9758165cd Initial revision
carl
parents:
diff changeset
226 #O EightBitMode=pass8
96a9758165cd Initial revision
carl
parents:
diff changeset
227
96a9758165cd Initial revision
carl
parents:
diff changeset
228 # wait for alias file rebuild (default units: minutes)
96a9758165cd Initial revision
carl
parents:
diff changeset
229 O AliasWait=10
96a9758165cd Initial revision
carl
parents:
diff changeset
230
96a9758165cd Initial revision
carl
parents:
diff changeset
231 # location of alias file
96a9758165cd Initial revision
carl
parents:
diff changeset
232 O AliasFile=/etc/mail/aliases
96a9758165cd Initial revision
carl
parents:
diff changeset
233
96a9758165cd Initial revision
carl
parents:
diff changeset
234 # minimum number of free blocks on filesystem
96a9758165cd Initial revision
carl
parents:
diff changeset
235 O MinFreeBlocks=100
96a9758165cd Initial revision
carl
parents:
diff changeset
236
96a9758165cd Initial revision
carl
parents:
diff changeset
237 # maximum message size
96a9758165cd Initial revision
carl
parents:
diff changeset
238 O MaxMessageSize=30000000
96a9758165cd Initial revision
carl
parents:
diff changeset
239
96a9758165cd Initial revision
carl
parents:
diff changeset
240 # substitution for space (blank) characters
96a9758165cd Initial revision
carl
parents:
diff changeset
241 O BlankSub=.
96a9758165cd Initial revision
carl
parents:
diff changeset
242
96a9758165cd Initial revision
carl
parents:
diff changeset
243 # avoid connecting to "expensive" mailers on initial submission?
96a9758165cd Initial revision
carl
parents:
diff changeset
244 O HoldExpensive=False
96a9758165cd Initial revision
carl
parents:
diff changeset
245
96a9758165cd Initial revision
carl
parents:
diff changeset
246 # checkpoint queue runs after every N successful deliveries
96a9758165cd Initial revision
carl
parents:
diff changeset
247 #O CheckpointInterval=10
96a9758165cd Initial revision
carl
parents:
diff changeset
248
96a9758165cd Initial revision
carl
parents:
diff changeset
249 # default delivery mode
96a9758165cd Initial revision
carl
parents:
diff changeset
250 O DeliveryMode=background
96a9758165cd Initial revision
carl
parents:
diff changeset
251
96a9758165cd Initial revision
carl
parents:
diff changeset
252 # error message header/file
96a9758165cd Initial revision
carl
parents:
diff changeset
253 #O ErrorHeader=/etc/mail/error-header
96a9758165cd Initial revision
carl
parents:
diff changeset
254
96a9758165cd Initial revision
carl
parents:
diff changeset
255 # error mode
96a9758165cd Initial revision
carl
parents:
diff changeset
256 #O ErrorMode=print
96a9758165cd Initial revision
carl
parents:
diff changeset
257
96a9758165cd Initial revision
carl
parents:
diff changeset
258 # save Unix-style "From_" lines at top of header?
96a9758165cd Initial revision
carl
parents:
diff changeset
259 #O SaveFromLine=False
96a9758165cd Initial revision
carl
parents:
diff changeset
260
96a9758165cd Initial revision
carl
parents:
diff changeset
261 # queue file mode (qf files)
96a9758165cd Initial revision
carl
parents:
diff changeset
262 #O QueueFileMode=0600
96a9758165cd Initial revision
carl
parents:
diff changeset
263
96a9758165cd Initial revision
carl
parents:
diff changeset
264 # temporary file mode
96a9758165cd Initial revision
carl
parents:
diff changeset
265 O TempFileMode=0600
96a9758165cd Initial revision
carl
parents:
diff changeset
266
96a9758165cd Initial revision
carl
parents:
diff changeset
267 # match recipients against GECOS field?
96a9758165cd Initial revision
carl
parents:
diff changeset
268 #O MatchGECOS=False
96a9758165cd Initial revision
carl
parents:
diff changeset
269
96a9758165cd Initial revision
carl
parents:
diff changeset
270 # maximum hop count
96a9758165cd Initial revision
carl
parents:
diff changeset
271 #O MaxHopCount=25
96a9758165cd Initial revision
carl
parents:
diff changeset
272
96a9758165cd Initial revision
carl
parents:
diff changeset
273 # location of help file
96a9758165cd Initial revision
carl
parents:
diff changeset
274 O HelpFile=/etc/mail/helpfile
96a9758165cd Initial revision
carl
parents:
diff changeset
275
96a9758165cd Initial revision
carl
parents:
diff changeset
276 # ignore dots as terminators in incoming messages?
96a9758165cd Initial revision
carl
parents:
diff changeset
277 #O IgnoreDots=False
96a9758165cd Initial revision
carl
parents:
diff changeset
278
96a9758165cd Initial revision
carl
parents:
diff changeset
279 # name resolver options
96a9758165cd Initial revision
carl
parents:
diff changeset
280 #O ResolverOptions=+AAONLY
96a9758165cd Initial revision
carl
parents:
diff changeset
281
96a9758165cd Initial revision
carl
parents:
diff changeset
282 # deliver MIME-encapsulated error messages?
96a9758165cd Initial revision
carl
parents:
diff changeset
283 O SendMimeErrors=True
96a9758165cd Initial revision
carl
parents:
diff changeset
284
96a9758165cd Initial revision
carl
parents:
diff changeset
285 # Forward file search path
96a9758165cd Initial revision
carl
parents:
diff changeset
286 O ForwardPath=$z/.forward.$w:$z/.forward
96a9758165cd Initial revision
carl
parents:
diff changeset
287
96a9758165cd Initial revision
carl
parents:
diff changeset
288 # open connection cache size
96a9758165cd Initial revision
carl
parents:
diff changeset
289 O ConnectionCacheSize=2
96a9758165cd Initial revision
carl
parents:
diff changeset
290
96a9758165cd Initial revision
carl
parents:
diff changeset
291 # open connection cache timeout
96a9758165cd Initial revision
carl
parents:
diff changeset
292 O ConnectionCacheTimeout=5m
96a9758165cd Initial revision
carl
parents:
diff changeset
293
96a9758165cd Initial revision
carl
parents:
diff changeset
294 # persistent host status directory
96a9758165cd Initial revision
carl
parents:
diff changeset
295 #O HostStatusDirectory=.hoststat
96a9758165cd Initial revision
carl
parents:
diff changeset
296
96a9758165cd Initial revision
carl
parents:
diff changeset
297 # single thread deliveries (requires HostStatusDirectory)?
96a9758165cd Initial revision
carl
parents:
diff changeset
298 #O SingleThreadDelivery=False
96a9758165cd Initial revision
carl
parents:
diff changeset
299
96a9758165cd Initial revision
carl
parents:
diff changeset
300 # use Errors-To: header?
96a9758165cd Initial revision
carl
parents:
diff changeset
301 O UseErrorsTo=False
96a9758165cd Initial revision
carl
parents:
diff changeset
302
96a9758165cd Initial revision
carl
parents:
diff changeset
303 # log level
96a9758165cd Initial revision
carl
parents:
diff changeset
304 O LogLevel=20
96a9758165cd Initial revision
carl
parents:
diff changeset
305
96a9758165cd Initial revision
carl
parents:
diff changeset
306 # send to me too, even in an alias expansion?
96a9758165cd Initial revision
carl
parents:
diff changeset
307 O MeToo=true
96a9758165cd Initial revision
carl
parents:
diff changeset
308
96a9758165cd Initial revision
carl
parents:
diff changeset
309 # verify RHS in newaliases?
96a9758165cd Initial revision
carl
parents:
diff changeset
310 O CheckAliases=False
96a9758165cd Initial revision
carl
parents:
diff changeset
311
96a9758165cd Initial revision
carl
parents:
diff changeset
312 # default messages to old style headers if no special punctuation?
96a9758165cd Initial revision
carl
parents:
diff changeset
313 O OldStyleHeaders=True
96a9758165cd Initial revision
carl
parents:
diff changeset
314
96a9758165cd Initial revision
carl
parents:
diff changeset
315 # SMTP daemon options
96a9758165cd Initial revision
carl
parents:
diff changeset
316
96a9758165cd Initial revision
carl
parents:
diff changeset
317 O DaemonPortOptions=port=26
96a9758165cd Initial revision
carl
parents:
diff changeset
318
96a9758165cd Initial revision
carl
parents:
diff changeset
319 # SMTP client options
96a9758165cd Initial revision
carl
parents:
diff changeset
320 #O ClientPortOptions=Family=inet, Address=0.0.0.0
96a9758165cd Initial revision
carl
parents:
diff changeset
321
96a9758165cd Initial revision
carl
parents:
diff changeset
322 # Modifiers to define {daemon_flags} for direct submissions
96a9758165cd Initial revision
carl
parents:
diff changeset
323 #O DirectSubmissionModifiers
96a9758165cd Initial revision
carl
parents:
diff changeset
324
96a9758165cd Initial revision
carl
parents:
diff changeset
325 # Use as mail submission program? See sendmail/SECURITY
96a9758165cd Initial revision
carl
parents:
diff changeset
326 #O UseMSP
96a9758165cd Initial revision
carl
parents:
diff changeset
327
96a9758165cd Initial revision
carl
parents:
diff changeset
328 # privacy flags
96a9758165cd Initial revision
carl
parents:
diff changeset
329 O PrivacyOptions=goaway,nobodyreturn,noreceipts
96a9758165cd Initial revision
carl
parents:
diff changeset
330
96a9758165cd Initial revision
carl
parents:
diff changeset
331 # who (if anyone) should get extra copies of error messages
96a9758165cd Initial revision
carl
parents:
diff changeset
332 #O PostmasterCopy=Postmaster
96a9758165cd Initial revision
carl
parents:
diff changeset
333
96a9758165cd Initial revision
carl
parents:
diff changeset
334 # slope of queue-only function
96a9758165cd Initial revision
carl
parents:
diff changeset
335 #O QueueFactor=600000
96a9758165cd Initial revision
carl
parents:
diff changeset
336
96a9758165cd Initial revision
carl
parents:
diff changeset
337 # limit on number of concurrent queue runners
96a9758165cd Initial revision
carl
parents:
diff changeset
338 #O MaxQueueChildren
96a9758165cd Initial revision
carl
parents:
diff changeset
339
96a9758165cd Initial revision
carl
parents:
diff changeset
340 # maximum number of queue-runners per queue-grouping with multiple queues
96a9758165cd Initial revision
carl
parents:
diff changeset
341 #O MaxRunnersPerQueue=1
96a9758165cd Initial revision
carl
parents:
diff changeset
342
96a9758165cd Initial revision
carl
parents:
diff changeset
343 # priority of queue runners (nice(3))
96a9758165cd Initial revision
carl
parents:
diff changeset
344 #O NiceQueueRun
96a9758165cd Initial revision
carl
parents:
diff changeset
345
96a9758165cd Initial revision
carl
parents:
diff changeset
346 # shall we sort the queue by hostname first?
96a9758165cd Initial revision
carl
parents:
diff changeset
347 #O QueueSortOrder=priority
96a9758165cd Initial revision
carl
parents:
diff changeset
348
96a9758165cd Initial revision
carl
parents:
diff changeset
349 # minimum time in queue before retry
96a9758165cd Initial revision
carl
parents:
diff changeset
350 #O MinQueueAge=30m
96a9758165cd Initial revision
carl
parents:
diff changeset
351
96a9758165cd Initial revision
carl
parents:
diff changeset
352 # how many jobs can you process in the queue?
96a9758165cd Initial revision
carl
parents:
diff changeset
353 #O MaxQueueRunSize=10000
96a9758165cd Initial revision
carl
parents:
diff changeset
354
96a9758165cd Initial revision
carl
parents:
diff changeset
355 # perform initial split of envelope without checking MX records
96a9758165cd Initial revision
carl
parents:
diff changeset
356 #O FastSplit=1
96a9758165cd Initial revision
carl
parents:
diff changeset
357
96a9758165cd Initial revision
carl
parents:
diff changeset
358 # queue directory
96a9758165cd Initial revision
carl
parents:
diff changeset
359 O QueueDirectory=/var/spool/mqueue
96a9758165cd Initial revision
carl
parents:
diff changeset
360
96a9758165cd Initial revision
carl
parents:
diff changeset
361 # key for shared memory; 0 to turn off
96a9758165cd Initial revision
carl
parents:
diff changeset
362 #O SharedMemoryKey=0
96a9758165cd Initial revision
carl
parents:
diff changeset
363
96a9758165cd Initial revision
carl
parents:
diff changeset
364
96a9758165cd Initial revision
carl
parents:
diff changeset
365
96a9758165cd Initial revision
carl
parents:
diff changeset
366 # timeouts (many of these)
96a9758165cd Initial revision
carl
parents:
diff changeset
367 #O Timeout.initial=5m
96a9758165cd Initial revision
carl
parents:
diff changeset
368 O Timeout.connect=1m
96a9758165cd Initial revision
carl
parents:
diff changeset
369 #O Timeout.aconnect=0s
96a9758165cd Initial revision
carl
parents:
diff changeset
370 #O Timeout.iconnect=5m
96a9758165cd Initial revision
carl
parents:
diff changeset
371 #O Timeout.helo=5m
96a9758165cd Initial revision
carl
parents:
diff changeset
372 #O Timeout.mail=10m
96a9758165cd Initial revision
carl
parents:
diff changeset
373 #O Timeout.rcpt=1h
96a9758165cd Initial revision
carl
parents:
diff changeset
374 #O Timeout.datainit=5m
96a9758165cd Initial revision
carl
parents:
diff changeset
375 #O Timeout.datablock=1h
96a9758165cd Initial revision
carl
parents:
diff changeset
376 #O Timeout.datafinal=1h
96a9758165cd Initial revision
carl
parents:
diff changeset
377 #O Timeout.rset=5m
96a9758165cd Initial revision
carl
parents:
diff changeset
378 #O Timeout.quit=2m
96a9758165cd Initial revision
carl
parents:
diff changeset
379 #O Timeout.misc=2m
96a9758165cd Initial revision
carl
parents:
diff changeset
380 #O Timeout.command=1h
96a9758165cd Initial revision
carl
parents:
diff changeset
381 O Timeout.ident=0
96a9758165cd Initial revision
carl
parents:
diff changeset
382 #O Timeout.fileopen=60s
96a9758165cd Initial revision
carl
parents:
diff changeset
383 #O Timeout.control=2m
96a9758165cd Initial revision
carl
parents:
diff changeset
384 O Timeout.queuereturn=5d
96a9758165cd Initial revision
carl
parents:
diff changeset
385 #O Timeout.queuereturn.normal=5d
96a9758165cd Initial revision
carl
parents:
diff changeset
386 #O Timeout.queuereturn.urgent=2d
96a9758165cd Initial revision
carl
parents:
diff changeset
387 #O Timeout.queuereturn.non-urgent=7d
96a9758165cd Initial revision
carl
parents:
diff changeset
388 O Timeout.queuewarn=4h
96a9758165cd Initial revision
carl
parents:
diff changeset
389 #O Timeout.queuewarn.normal=4h
96a9758165cd Initial revision
carl
parents:
diff changeset
390 #O Timeout.queuewarn.urgent=1h
96a9758165cd Initial revision
carl
parents:
diff changeset
391 #O Timeout.queuewarn.non-urgent=12h
96a9758165cd Initial revision
carl
parents:
diff changeset
392 #O Timeout.hoststatus=30m
96a9758165cd Initial revision
carl
parents:
diff changeset
393 #O Timeout.resolver.retrans=5s
96a9758165cd Initial revision
carl
parents:
diff changeset
394 #O Timeout.resolver.retrans.first=5s
96a9758165cd Initial revision
carl
parents:
diff changeset
395 #O Timeout.resolver.retrans.normal=5s
96a9758165cd Initial revision
carl
parents:
diff changeset
396 #O Timeout.resolver.retry=4
96a9758165cd Initial revision
carl
parents:
diff changeset
397 #O Timeout.resolver.retry.first=4
96a9758165cd Initial revision
carl
parents:
diff changeset
398 #O Timeout.resolver.retry.normal=4
96a9758165cd Initial revision
carl
parents:
diff changeset
399 #O Timeout.lhlo=2m
96a9758165cd Initial revision
carl
parents:
diff changeset
400 #O Timeout.auth=10m
96a9758165cd Initial revision
carl
parents:
diff changeset
401 #O Timeout.starttls=1h
96a9758165cd Initial revision
carl
parents:
diff changeset
402
96a9758165cd Initial revision
carl
parents:
diff changeset
403 # time for DeliverBy; extension disabled if less than 0
96a9758165cd Initial revision
carl
parents:
diff changeset
404 #O DeliverByMin=0
96a9758165cd Initial revision
carl
parents:
diff changeset
405
96a9758165cd Initial revision
carl
parents:
diff changeset
406 # should we not prune routes in route-addr syntax addresses?
96a9758165cd Initial revision
carl
parents:
diff changeset
407 #O DontPruneRoutes=False
96a9758165cd Initial revision
carl
parents:
diff changeset
408
96a9758165cd Initial revision
carl
parents:
diff changeset
409 # queue up everything before forking?
96a9758165cd Initial revision
carl
parents:
diff changeset
410 O SuperSafe=True
96a9758165cd Initial revision
carl
parents:
diff changeset
411
96a9758165cd Initial revision
carl
parents:
diff changeset
412 # status file
96a9758165cd Initial revision
carl
parents:
diff changeset
413 O StatusFile=/usr/src/rh8/dnsbl/sendmail.st
96a9758165cd Initial revision
carl
parents:
diff changeset
414
96a9758165cd Initial revision
carl
parents:
diff changeset
415 # time zone handling:
96a9758165cd Initial revision
carl
parents:
diff changeset
416 # if undefined, use system default
96a9758165cd Initial revision
carl
parents:
diff changeset
417 # if defined but null, use TZ envariable passed in
96a9758165cd Initial revision
carl
parents:
diff changeset
418 # if defined and non-null, use that info
96a9758165cd Initial revision
carl
parents:
diff changeset
419 #O TimeZoneSpec=
96a9758165cd Initial revision
carl
parents:
diff changeset
420
96a9758165cd Initial revision
carl
parents:
diff changeset
421 # default UID (can be username or userid:groupid)
96a9758165cd Initial revision
carl
parents:
diff changeset
422 O DefaultUser=8:12
96a9758165cd Initial revision
carl
parents:
diff changeset
423
96a9758165cd Initial revision
carl
parents:
diff changeset
424 # list of locations of user database file (null means no lookup)
96a9758165cd Initial revision
carl
parents:
diff changeset
425 #O UserDatabaseSpec=/etc/mail/userdb
96a9758165cd Initial revision
carl
parents:
diff changeset
426
96a9758165cd Initial revision
carl
parents:
diff changeset
427 # fallback MX host
96a9758165cd Initial revision
carl
parents:
diff changeset
428 #O FallbackMXhost=fall.back.host.net
96a9758165cd Initial revision
carl
parents:
diff changeset
429
96a9758165cd Initial revision
carl
parents:
diff changeset
430 # if we are the best MX host for a site, try it directly instead of config err
96a9758165cd Initial revision
carl
parents:
diff changeset
431 #O TryNullMXList=False
96a9758165cd Initial revision
carl
parents:
diff changeset
432
96a9758165cd Initial revision
carl
parents:
diff changeset
433 # load average at which we just queue messages
96a9758165cd Initial revision
carl
parents:
diff changeset
434 O QueueLA=12
96a9758165cd Initial revision
carl
parents:
diff changeset
435
96a9758165cd Initial revision
carl
parents:
diff changeset
436 # load average at which we refuse connections
96a9758165cd Initial revision
carl
parents:
diff changeset
437 O RefuseLA=8
96a9758165cd Initial revision
carl
parents:
diff changeset
438
96a9758165cd Initial revision
carl
parents:
diff changeset
439 # load average at which we delay connections; 0 means no limit
96a9758165cd Initial revision
carl
parents:
diff changeset
440 #O DelayLA=0
96a9758165cd Initial revision
carl
parents:
diff changeset
441
96a9758165cd Initial revision
carl
parents:
diff changeset
442 # maximum number of children we allow at one time
96a9758165cd Initial revision
carl
parents:
diff changeset
443 O MaxDaemonChildren=20
96a9758165cd Initial revision
carl
parents:
diff changeset
444
96a9758165cd Initial revision
carl
parents:
diff changeset
445 # maximum number of new connections per second
96a9758165cd Initial revision
carl
parents:
diff changeset
446 O ConnectionRateThrottle=1
96a9758165cd Initial revision
carl
parents:
diff changeset
447
96a9758165cd Initial revision
carl
parents:
diff changeset
448 # work recipient factor
96a9758165cd Initial revision
carl
parents:
diff changeset
449 #O RecipientFactor=30000
96a9758165cd Initial revision
carl
parents:
diff changeset
450
96a9758165cd Initial revision
carl
parents:
diff changeset
451 # deliver each queued job in a separate process?
96a9758165cd Initial revision
carl
parents:
diff changeset
452 #O ForkEachJob=False
96a9758165cd Initial revision
carl
parents:
diff changeset
453
96a9758165cd Initial revision
carl
parents:
diff changeset
454 # work class factor
96a9758165cd Initial revision
carl
parents:
diff changeset
455 #O ClassFactor=1800
96a9758165cd Initial revision
carl
parents:
diff changeset
456
96a9758165cd Initial revision
carl
parents:
diff changeset
457 # work time factor
96a9758165cd Initial revision
carl
parents:
diff changeset
458 #O RetryFactor=90000
96a9758165cd Initial revision
carl
parents:
diff changeset
459
96a9758165cd Initial revision
carl
parents:
diff changeset
460 # default character set
96a9758165cd Initial revision
carl
parents:
diff changeset
461 #O DefaultCharSet=iso-8859-1
96a9758165cd Initial revision
carl
parents:
diff changeset
462
96a9758165cd Initial revision
carl
parents:
diff changeset
463 # service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
96a9758165cd Initial revision
carl
parents:
diff changeset
464 #O ServiceSwitchFile=/etc/mail/service.switch
96a9758165cd Initial revision
carl
parents:
diff changeset
465
96a9758165cd Initial revision
carl
parents:
diff changeset
466 # hosts file (normally /etc/hosts)
96a9758165cd Initial revision
carl
parents:
diff changeset
467 #O HostsFile=/etc/hosts
96a9758165cd Initial revision
carl
parents:
diff changeset
468
96a9758165cd Initial revision
carl
parents:
diff changeset
469 # dialup line delay on connection failure
96a9758165cd Initial revision
carl
parents:
diff changeset
470 #O DialDelay=10s
96a9758165cd Initial revision
carl
parents:
diff changeset
471
96a9758165cd Initial revision
carl
parents:
diff changeset
472 # action to take if there are no recipients in the message
96a9758165cd Initial revision
carl
parents:
diff changeset
473 #O NoRecipientAction=add-to-undisclosed
96a9758165cd Initial revision
carl
parents:
diff changeset
474
96a9758165cd Initial revision
carl
parents:
diff changeset
475 # chrooted environment for writing to files
96a9758165cd Initial revision
carl
parents:
diff changeset
476 #O SafeFileEnvironment=/arch
96a9758165cd Initial revision
carl
parents:
diff changeset
477
96a9758165cd Initial revision
carl
parents:
diff changeset
478 # are colons OK in addresses?
96a9758165cd Initial revision
carl
parents:
diff changeset
479 #O ColonOkInAddr=True
96a9758165cd Initial revision
carl
parents:
diff changeset
480
96a9758165cd Initial revision
carl
parents:
diff changeset
481 # shall I avoid expanding CNAMEs (violates protocols)?
96a9758165cd Initial revision
carl
parents:
diff changeset
482 #O DontExpandCnames=False
96a9758165cd Initial revision
carl
parents:
diff changeset
483
96a9758165cd Initial revision
carl
parents:
diff changeset
484 # SMTP initial login message (old $e macro)
96a9758165cd Initial revision
carl
parents:
diff changeset
485 O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
96a9758165cd Initial revision
carl
parents:
diff changeset
486
96a9758165cd Initial revision
carl
parents:
diff changeset
487 # UNIX initial From header format (old $l macro)
96a9758165cd Initial revision
carl
parents:
diff changeset
488 O UnixFromLine=From $g $d
96a9758165cd Initial revision
carl
parents:
diff changeset
489
96a9758165cd Initial revision
carl
parents:
diff changeset
490 # From: lines that have embedded newlines are unwrapped onto one line
96a9758165cd Initial revision
carl
parents:
diff changeset
491 #O SingleLineFromHeader=False
96a9758165cd Initial revision
carl
parents:
diff changeset
492
96a9758165cd Initial revision
carl
parents:
diff changeset
493 # Allow HELO SMTP command that does not include a host name
96a9758165cd Initial revision
carl
parents:
diff changeset
494 #O AllowBogusHELO=False
96a9758165cd Initial revision
carl
parents:
diff changeset
495
96a9758165cd Initial revision
carl
parents:
diff changeset
496 # Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
96a9758165cd Initial revision
carl
parents:
diff changeset
497 #O MustQuoteChars=.
96a9758165cd Initial revision
carl
parents:
diff changeset
498
96a9758165cd Initial revision
carl
parents:
diff changeset
499 # delimiter (operator) characters (old $o macro)
96a9758165cd Initial revision
carl
parents:
diff changeset
500 O OperatorChars=.:%@!^/[]+
96a9758165cd Initial revision
carl
parents:
diff changeset
501
96a9758165cd Initial revision
carl
parents:
diff changeset
502 # shall I avoid calling initgroups(3) because of high NIS costs?
96a9758165cd Initial revision
carl
parents:
diff changeset
503 #O DontInitGroups=False
96a9758165cd Initial revision
carl
parents:
diff changeset
504
96a9758165cd Initial revision
carl
parents:
diff changeset
505 # are group-writable :include: and .forward files (un)trustworthy?
96a9758165cd Initial revision
carl
parents:
diff changeset
506 # True (the default) means they are not trustworthy.
96a9758165cd Initial revision
carl
parents:
diff changeset
507 #O UnsafeGroupWrites=True
96a9758165cd Initial revision
carl
parents:
diff changeset
508
96a9758165cd Initial revision
carl
parents:
diff changeset
509
96a9758165cd Initial revision
carl
parents:
diff changeset
510 # where do errors that occur when sending errors get sent?
96a9758165cd Initial revision
carl
parents:
diff changeset
511 O DoubleBounceAddress
96a9758165cd Initial revision
carl
parents:
diff changeset
512
96a9758165cd Initial revision
carl
parents:
diff changeset
513 # where to save bounces if all else fails
96a9758165cd Initial revision
carl
parents:
diff changeset
514 #O DeadLetterDrop=/var/tmp/dead.letter
96a9758165cd Initial revision
carl
parents:
diff changeset
515
96a9758165cd Initial revision
carl
parents:
diff changeset
516 # what user id do we assume for the majority of the processing?
96a9758165cd Initial revision
carl
parents:
diff changeset
517 #O RunAsUser=sendmail
96a9758165cd Initial revision
carl
parents:
diff changeset
518
96a9758165cd Initial revision
carl
parents:
diff changeset
519 # maximum number of recipients per SMTP envelope
96a9758165cd Initial revision
carl
parents:
diff changeset
520 #O MaxRecipientsPerMessage=100
96a9758165cd Initial revision
carl
parents:
diff changeset
521
96a9758165cd Initial revision
carl
parents:
diff changeset
522 # limit the rate recipients per SMTP envelope are accepted
96a9758165cd Initial revision
carl
parents:
diff changeset
523 # once the threshold number of recipients have been rejected
96a9758165cd Initial revision
carl
parents:
diff changeset
524 O BadRcptThrottle=2
96a9758165cd Initial revision
carl
parents:
diff changeset
525
96a9758165cd Initial revision
carl
parents:
diff changeset
526 # shall we get local names from our installed interfaces?
96a9758165cd Initial revision
carl
parents:
diff changeset
527 O DontProbeInterfaces=true
96a9758165cd Initial revision
carl
parents:
diff changeset
528
96a9758165cd Initial revision
carl
parents:
diff changeset
529 # Return-Receipt-To: header implies DSN request
96a9758165cd Initial revision
carl
parents:
diff changeset
530 #O RrtImpliesDsn=False
96a9758165cd Initial revision
carl
parents:
diff changeset
531
96a9758165cd Initial revision
carl
parents:
diff changeset
532 # override connection address (for testing)
96a9758165cd Initial revision
carl
parents:
diff changeset
533 #O ConnectOnlyTo=0.0.0.0
96a9758165cd Initial revision
carl
parents:
diff changeset
534
96a9758165cd Initial revision
carl
parents:
diff changeset
535 # Trusted user for file ownership and starting the daemon
96a9758165cd Initial revision
carl
parents:
diff changeset
536 #O TrustedUser=root
96a9758165cd Initial revision
carl
parents:
diff changeset
537
96a9758165cd Initial revision
carl
parents:
diff changeset
538 # Control socket for daemon management
96a9758165cd Initial revision
carl
parents:
diff changeset
539 #O ControlSocketName=/var/spool/mqueue/.control
96a9758165cd Initial revision
carl
parents:
diff changeset
540
96a9758165cd Initial revision
carl
parents:
diff changeset
541 # Maximum MIME header length to protect MUAs
96a9758165cd Initial revision
carl
parents:
diff changeset
542 #O MaxMimeHeaderLength=0/0
96a9758165cd Initial revision
carl
parents:
diff changeset
543
96a9758165cd Initial revision
carl
parents:
diff changeset
544 # Maximum length of the sum of all headers
96a9758165cd Initial revision
carl
parents:
diff changeset
545 #O MaxHeadersLength=32768
96a9758165cd Initial revision
carl
parents:
diff changeset
546
96a9758165cd Initial revision
carl
parents:
diff changeset
547 # Maximum depth of alias recursion
96a9758165cd Initial revision
carl
parents:
diff changeset
548 #O MaxAliasRecursion=10
96a9758165cd Initial revision
carl
parents:
diff changeset
549
96a9758165cd Initial revision
carl
parents:
diff changeset
550 # location of pid file
96a9758165cd Initial revision
carl
parents:
diff changeset
551 O PidFile=/var/run/sm-test.pid
96a9758165cd Initial revision
carl
parents:
diff changeset
552
96a9758165cd Initial revision
carl
parents:
diff changeset
553 # Prefix string for the process title shown on 'ps' listings
96a9758165cd Initial revision
carl
parents:
diff changeset
554 #O ProcessTitlePrefix=prefix
96a9758165cd Initial revision
carl
parents:
diff changeset
555
96a9758165cd Initial revision
carl
parents:
diff changeset
556 # Data file (df) memory-buffer file maximum size
96a9758165cd Initial revision
carl
parents:
diff changeset
557 #O DataFileBufferSize=4096
96a9758165cd Initial revision
carl
parents:
diff changeset
558
96a9758165cd Initial revision
carl
parents:
diff changeset
559 # Transcript file (xf) memory-buffer file maximum size
96a9758165cd Initial revision
carl
parents:
diff changeset
560 #O XscriptFileBufferSize=4096
96a9758165cd Initial revision
carl
parents:
diff changeset
561
96a9758165cd Initial revision
carl
parents:
diff changeset
562 # lookup type to find information about local mailboxes
96a9758165cd Initial revision
carl
parents:
diff changeset
563 #O MailboxDatabase=pw
96a9758165cd Initial revision
carl
parents:
diff changeset
564
96a9758165cd Initial revision
carl
parents:
diff changeset
565 # list of authentication mechanisms
96a9758165cd Initial revision
carl
parents:
diff changeset
566 O AuthMechanisms=LOGIN PLAIN
96a9758165cd Initial revision
carl
parents:
diff changeset
567
96a9758165cd Initial revision
carl
parents:
diff changeset
568 # default authentication information for outgoing connections
96a9758165cd Initial revision
carl
parents:
diff changeset
569 #O DefaultAuthInfo=/etc/mail/default-auth-info
96a9758165cd Initial revision
carl
parents:
diff changeset
570
96a9758165cd Initial revision
carl
parents:
diff changeset
571 # SMTP AUTH flags
96a9758165cd Initial revision
carl
parents:
diff changeset
572 O AuthOptions=A
96a9758165cd Initial revision
carl
parents:
diff changeset
573
96a9758165cd Initial revision
carl
parents:
diff changeset
574 # SMTP AUTH maximum encryption strength
96a9758165cd Initial revision
carl
parents:
diff changeset
575 #O AuthMaxBits
96a9758165cd Initial revision
carl
parents:
diff changeset
576
96a9758165cd Initial revision
carl
parents:
diff changeset
577 # SMTP STARTTLS server options
96a9758165cd Initial revision
carl
parents:
diff changeset
578 #O TLSSrvOptions
96a9758165cd Initial revision
carl
parents:
diff changeset
579
96a9758165cd Initial revision
carl
parents:
diff changeset
580 # Input mail filters
96a9758165cd Initial revision
carl
parents:
diff changeset
581 O InputMailFilters=dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
582
96a9758165cd Initial revision
carl
parents:
diff changeset
583 # Milter options
96a9758165cd Initial revision
carl
parents:
diff changeset
584 #O Milter.LogLevel
96a9758165cd Initial revision
carl
parents:
diff changeset
585 O Milter.macros.connect=j, _, {daemon_name}, {if_name}, {if_addr}
96a9758165cd Initial revision
carl
parents:
diff changeset
586 O Milter.macros.helo={tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}
96a9758165cd Initial revision
carl
parents:
diff changeset
587 O Milter.macros.envfrom=i, {auth_type}, {auth_authen}, {auth_ssf}, {auth_author}, {mail_mailer}, {mail_host}, {mail_addr}
96a9758165cd Initial revision
carl
parents:
diff changeset
588 O Milter.macros.envrcpt={rcpt_mailer}, {rcpt_host}, {rcpt_addr}
96a9758165cd Initial revision
carl
parents:
diff changeset
589
96a9758165cd Initial revision
carl
parents:
diff changeset
590 # CA directory
96a9758165cd Initial revision
carl
parents:
diff changeset
591 #O CACertPath
96a9758165cd Initial revision
carl
parents:
diff changeset
592 # CA file
96a9758165cd Initial revision
carl
parents:
diff changeset
593 #O CACertFile
96a9758165cd Initial revision
carl
parents:
diff changeset
594 # Server Cert
96a9758165cd Initial revision
carl
parents:
diff changeset
595 #O ServerCertFile
96a9758165cd Initial revision
carl
parents:
diff changeset
596 # Server private key
96a9758165cd Initial revision
carl
parents:
diff changeset
597 #O ServerKeyFile
96a9758165cd Initial revision
carl
parents:
diff changeset
598 # Client Cert
96a9758165cd Initial revision
carl
parents:
diff changeset
599 #O ClientCertFile
96a9758165cd Initial revision
carl
parents:
diff changeset
600 # Client private key
96a9758165cd Initial revision
carl
parents:
diff changeset
601 #O ClientKeyFile
96a9758165cd Initial revision
carl
parents:
diff changeset
602 # DHParameters (only required if DSA/DH is used)
96a9758165cd Initial revision
carl
parents:
diff changeset
603 #O DHParameters
96a9758165cd Initial revision
carl
parents:
diff changeset
604 # Random data source (required for systems without /dev/urandom under OpenSSL)
96a9758165cd Initial revision
carl
parents:
diff changeset
605 #O RandFile
96a9758165cd Initial revision
carl
parents:
diff changeset
606
96a9758165cd Initial revision
carl
parents:
diff changeset
607 ############################
96a9758165cd Initial revision
carl
parents:
diff changeset
608 # QUEUE GROUP DEFINITIONS #
96a9758165cd Initial revision
carl
parents:
diff changeset
609 ############################
96a9758165cd Initial revision
carl
parents:
diff changeset
610
96a9758165cd Initial revision
carl
parents:
diff changeset
611
96a9758165cd Initial revision
carl
parents:
diff changeset
612 ###########################
96a9758165cd Initial revision
carl
parents:
diff changeset
613 # Message precedences #
96a9758165cd Initial revision
carl
parents:
diff changeset
614 ###########################
96a9758165cd Initial revision
carl
parents:
diff changeset
615
96a9758165cd Initial revision
carl
parents:
diff changeset
616 Pfirst-class=0
96a9758165cd Initial revision
carl
parents:
diff changeset
617 Pspecial-delivery=100
96a9758165cd Initial revision
carl
parents:
diff changeset
618 Plist=-30
96a9758165cd Initial revision
carl
parents:
diff changeset
619 Pbulk=-60
96a9758165cd Initial revision
carl
parents:
diff changeset
620 Pjunk=-100
96a9758165cd Initial revision
carl
parents:
diff changeset
621
96a9758165cd Initial revision
carl
parents:
diff changeset
622 #####################
96a9758165cd Initial revision
carl
parents:
diff changeset
623 # Trusted users #
96a9758165cd Initial revision
carl
parents:
diff changeset
624 #####################
96a9758165cd Initial revision
carl
parents:
diff changeset
625
96a9758165cd Initial revision
carl
parents:
diff changeset
626 # this is equivalent to setting class "t"
96a9758165cd Initial revision
carl
parents:
diff changeset
627 Ft/etc/mail/sendmail.ct
96a9758165cd Initial revision
carl
parents:
diff changeset
628 Troot
96a9758165cd Initial revision
carl
parents:
diff changeset
629 Tdaemon
96a9758165cd Initial revision
carl
parents:
diff changeset
630 Tuucp
96a9758165cd Initial revision
carl
parents:
diff changeset
631
96a9758165cd Initial revision
carl
parents:
diff changeset
632 #########################
96a9758165cd Initial revision
carl
parents:
diff changeset
633 # Format of headers #
96a9758165cd Initial revision
carl
parents:
diff changeset
634 #########################
96a9758165cd Initial revision
carl
parents:
diff changeset
635
96a9758165cd Initial revision
carl
parents:
diff changeset
636 H?P?Return-Path: <$g>
96a9758165cd Initial revision
carl
parents:
diff changeset
637 HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
96a9758165cd Initial revision
carl
parents:
diff changeset
638 $.$?{auth_type}(authenticated$?{auth_ssf} bits=${auth_ssf}$.)
96a9758165cd Initial revision
carl
parents:
diff changeset
639 $.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version}
96a9758165cd Initial revision
carl
parents:
diff changeset
640 (version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify})$.$?u
96a9758165cd Initial revision
carl
parents:
diff changeset
641 for $u; $|;
96a9758165cd Initial revision
carl
parents:
diff changeset
642 $.$b
96a9758165cd Initial revision
carl
parents:
diff changeset
643 H?D?Resent-Date: $a
96a9758165cd Initial revision
carl
parents:
diff changeset
644 H?D?Date: $a
96a9758165cd Initial revision
carl
parents:
diff changeset
645 H?F?Resent-From: $?x$x <$g>$|$g$.
96a9758165cd Initial revision
carl
parents:
diff changeset
646 H?F?From: $?x$x <$g>$|$g$.
96a9758165cd Initial revision
carl
parents:
diff changeset
647 H?x?Full-Name: $x
96a9758165cd Initial revision
carl
parents:
diff changeset
648 # HPosted-Date: $a
96a9758165cd Initial revision
carl
parents:
diff changeset
649 # H?l?Received-Date: $b
96a9758165cd Initial revision
carl
parents:
diff changeset
650 H?M?Resent-Message-Id: <$t.$i@$j>
96a9758165cd Initial revision
carl
parents:
diff changeset
651 H?M?Message-Id: <$t.$i@$j>
96a9758165cd Initial revision
carl
parents:
diff changeset
652
96a9758165cd Initial revision
carl
parents:
diff changeset
653 #
96a9758165cd Initial revision
carl
parents:
diff changeset
654 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
655 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
656 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
657 ##### REWRITING RULES
96a9758165cd Initial revision
carl
parents:
diff changeset
658 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
659 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
660 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
661
96a9758165cd Initial revision
carl
parents:
diff changeset
662 ############################################
96a9758165cd Initial revision
carl
parents:
diff changeset
663 ### Ruleset 3 -- Name Canonicalization ###
96a9758165cd Initial revision
carl
parents:
diff changeset
664 ############################################
96a9758165cd Initial revision
carl
parents:
diff changeset
665 Scanonify=3
96a9758165cd Initial revision
carl
parents:
diff changeset
666
96a9758165cd Initial revision
carl
parents:
diff changeset
667 # handle null input (translate to <@> special case)
96a9758165cd Initial revision
carl
parents:
diff changeset
668 R$@ $@ <@>
96a9758165cd Initial revision
carl
parents:
diff changeset
669
96a9758165cd Initial revision
carl
parents:
diff changeset
670 # strip group: syntax (not inside angle brackets!) and trailing semicolon
96a9758165cd Initial revision
carl
parents:
diff changeset
671 R$* $: $1 <@> mark addresses
96a9758165cd Initial revision
carl
parents:
diff changeset
672 R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
96a9758165cd Initial revision
carl
parents:
diff changeset
673 R@ $* <@> $: @ $1 unmark @host:...
96a9758165cd Initial revision
carl
parents:
diff changeset
674 R$* [ IPv6 : $+ ] <@> $: $1 [ IPv6 : $2 ] unmark IPv6 addr
96a9758165cd Initial revision
carl
parents:
diff changeset
675 R$* :: $* <@> $: $1 :: $2 unmark node::addr
96a9758165cd Initial revision
carl
parents:
diff changeset
676 R:include: $* <@> $: :include: $1 unmark :include:...
96a9758165cd Initial revision
carl
parents:
diff changeset
677 R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
96a9758165cd Initial revision
carl
parents:
diff changeset
678 R$* : $* <@> $: $2 strip colon if marked
96a9758165cd Initial revision
carl
parents:
diff changeset
679 R$* <@> $: $1 unmark
96a9758165cd Initial revision
carl
parents:
diff changeset
680 R$* ; $1 strip trailing semi
96a9758165cd Initial revision
carl
parents:
diff changeset
681 R$* < $+ :; > $* $@ $2 :; <@> catch <list:;>
96a9758165cd Initial revision
carl
parents:
diff changeset
682 R$* < $* ; > $1 < $2 > bogus bracketed semi
96a9758165cd Initial revision
carl
parents:
diff changeset
683
96a9758165cd Initial revision
carl
parents:
diff changeset
684 # null input now results from list:; syntax
96a9758165cd Initial revision
carl
parents:
diff changeset
685 R$@ $@ :; <@>
96a9758165cd Initial revision
carl
parents:
diff changeset
686
96a9758165cd Initial revision
carl
parents:
diff changeset
687 # strip angle brackets -- note RFC733 heuristic to get innermost item
96a9758165cd Initial revision
carl
parents:
diff changeset
688 R$* $: < $1 > housekeeping <>
96a9758165cd Initial revision
carl
parents:
diff changeset
689 R$+ < $* > < $2 > strip excess on left
96a9758165cd Initial revision
carl
parents:
diff changeset
690 R< $* > $+ < $1 > strip excess on right
96a9758165cd Initial revision
carl
parents:
diff changeset
691 R<> $@ < @ > MAIL FROM:<> case
96a9758165cd Initial revision
carl
parents:
diff changeset
692 R< $+ > $: $1 remove housekeeping <>
96a9758165cd Initial revision
carl
parents:
diff changeset
693
96a9758165cd Initial revision
carl
parents:
diff changeset
694 # strip route address <@a,@b,@c:user@d> -> <user@d>
96a9758165cd Initial revision
carl
parents:
diff changeset
695 R@ $+ , $+ $2
96a9758165cd Initial revision
carl
parents:
diff changeset
696 R@ [ $* ] : $+ $2
96a9758165cd Initial revision
carl
parents:
diff changeset
697 R@ $+ : $+ $2
96a9758165cd Initial revision
carl
parents:
diff changeset
698
96a9758165cd Initial revision
carl
parents:
diff changeset
699 # find focus for list syntax
96a9758165cd Initial revision
carl
parents:
diff changeset
700 R $+ : $* ; @ $+ $@ $>Canonify2 $1 : $2 ; < @ $3 > list syntax
96a9758165cd Initial revision
carl
parents:
diff changeset
701 R $+ : $* ; $@ $1 : $2; list syntax
96a9758165cd Initial revision
carl
parents:
diff changeset
702
96a9758165cd Initial revision
carl
parents:
diff changeset
703 # find focus for @ syntax addresses
96a9758165cd Initial revision
carl
parents:
diff changeset
704 R$+ @ $+ $: $1 < @ $2 > focus on domain
96a9758165cd Initial revision
carl
parents:
diff changeset
705 R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
96a9758165cd Initial revision
carl
parents:
diff changeset
706 R$+ < @ $+ > $@ $>Canonify2 $1 < @ $2 > already canonical
96a9758165cd Initial revision
carl
parents:
diff changeset
707
96a9758165cd Initial revision
carl
parents:
diff changeset
708
96a9758165cd Initial revision
carl
parents:
diff changeset
709 # convert old-style addresses to a domain-based address
96a9758165cd Initial revision
carl
parents:
diff changeset
710 R$- ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP > resolve uucp names
96a9758165cd Initial revision
carl
parents:
diff changeset
711 R$+ . $- ! $+ $@ $>Canonify2 $3 < @ $1 . $2 > domain uucps
96a9758165cd Initial revision
carl
parents:
diff changeset
712 R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP > uucp subdomains
96a9758165cd Initial revision
carl
parents:
diff changeset
713
96a9758165cd Initial revision
carl
parents:
diff changeset
714 # if we have % signs, take the rightmost one
96a9758165cd Initial revision
carl
parents:
diff changeset
715 R$* % $* $1 @ $2 First make them all @s.
96a9758165cd Initial revision
carl
parents:
diff changeset
716 R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
96a9758165cd Initial revision
carl
parents:
diff changeset
717 R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish
96a9758165cd Initial revision
carl
parents:
diff changeset
718
96a9758165cd Initial revision
carl
parents:
diff changeset
719 # else we must be a local name
96a9758165cd Initial revision
carl
parents:
diff changeset
720 R$* $@ $>Canonify2 $1
96a9758165cd Initial revision
carl
parents:
diff changeset
721
96a9758165cd Initial revision
carl
parents:
diff changeset
722
96a9758165cd Initial revision
carl
parents:
diff changeset
723 ################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
724 ### Ruleset 96 -- bottom half of ruleset 3 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
725 ################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
726
96a9758165cd Initial revision
carl
parents:
diff changeset
727 SCanonify2=96
96a9758165cd Initial revision
carl
parents:
diff changeset
728
96a9758165cd Initial revision
carl
parents:
diff changeset
729 # handle special cases for local names
96a9758165cd Initial revision
carl
parents:
diff changeset
730 R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
96a9758165cd Initial revision
carl
parents:
diff changeset
731 R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
96a9758165cd Initial revision
carl
parents:
diff changeset
732 R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
96a9758165cd Initial revision
carl
parents:
diff changeset
733
96a9758165cd Initial revision
carl
parents:
diff changeset
734 # check for IPv4/IPv6 domain literal
96a9758165cd Initial revision
carl
parents:
diff changeset
735 R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [addr]
96a9758165cd Initial revision
carl
parents:
diff changeset
736 R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
96a9758165cd Initial revision
carl
parents:
diff changeset
737 R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
96a9758165cd Initial revision
carl
parents:
diff changeset
738
96a9758165cd Initial revision
carl
parents:
diff changeset
739
96a9758165cd Initial revision
carl
parents:
diff changeset
740
96a9758165cd Initial revision
carl
parents:
diff changeset
741
96a9758165cd Initial revision
carl
parents:
diff changeset
742
96a9758165cd Initial revision
carl
parents:
diff changeset
743 # if really UUCP, handle it immediately
96a9758165cd Initial revision
carl
parents:
diff changeset
744
96a9758165cd Initial revision
carl
parents:
diff changeset
745 # try UUCP traffic as a local address
96a9758165cd Initial revision
carl
parents:
diff changeset
746 R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
747 R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
748
96a9758165cd Initial revision
carl
parents:
diff changeset
749 # hostnames ending in class P are always canonical
96a9758165cd Initial revision
carl
parents:
diff changeset
750 R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
96a9758165cd Initial revision
carl
parents:
diff changeset
751 R$* < @ $* $~P > $* $: $&{daemon_flags} $| $1 < @ $2 $3 > $4
96a9758165cd Initial revision
carl
parents:
diff changeset
752 R$* CC $* $| $* < @ $+.$+ > $* $: $3 < @ $4.$5 . > $6
96a9758165cd Initial revision
carl
parents:
diff changeset
753 R$* CC $* $| $* $: $3
96a9758165cd Initial revision
carl
parents:
diff changeset
754 # pass to name server to make hostname canonical
96a9758165cd Initial revision
carl
parents:
diff changeset
755 R$* $| $* < @ $* > $* $: $2 < @ $[ $3 $] > $4
96a9758165cd Initial revision
carl
parents:
diff changeset
756 R$* $| $* $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
757
96a9758165cd Initial revision
carl
parents:
diff changeset
758 # local host aliases and pseudo-domains are always canonical
96a9758165cd Initial revision
carl
parents:
diff changeset
759 R$* < @ $=w > $* $: $1 < @ $2 . > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
760 R$* < @ $=M > $* $: $1 < @ $2 . > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
761 R$* < @ $={VirtHost} > $* $: $1 < @ $2 . > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
762 R$* < @ $=G > $* $: $1 < @ $2 . > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
763 R$* < @ $* . . > $* $1 < @ $2 . > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
764
96a9758165cd Initial revision
carl
parents:
diff changeset
765
96a9758165cd Initial revision
carl
parents:
diff changeset
766 ##################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
767 ### Ruleset 4 -- Final Output Post-rewriting ###
96a9758165cd Initial revision
carl
parents:
diff changeset
768 ##################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
769 Sfinal=4
96a9758165cd Initial revision
carl
parents:
diff changeset
770
96a9758165cd Initial revision
carl
parents:
diff changeset
771 R$+ :; <@> $@ $1 : handle <list:;>
96a9758165cd Initial revision
carl
parents:
diff changeset
772 R$* <@> $@ handle <> and list:;
96a9758165cd Initial revision
carl
parents:
diff changeset
773
96a9758165cd Initial revision
carl
parents:
diff changeset
774 # strip trailing dot off possibly canonical name
96a9758165cd Initial revision
carl
parents:
diff changeset
775 R$* < @ $+ . > $* $1 < @ $2 > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
776
96a9758165cd Initial revision
carl
parents:
diff changeset
777 # eliminate internal code
96a9758165cd Initial revision
carl
parents:
diff changeset
778 R$* < @ *LOCAL* > $* $1 < @ $j > $2
96a9758165cd Initial revision
carl
parents:
diff changeset
779
96a9758165cd Initial revision
carl
parents:
diff changeset
780 # externalize local domain info
96a9758165cd Initial revision
carl
parents:
diff changeset
781 R$* < $+ > $* $1 $2 $3 defocus
96a9758165cd Initial revision
carl
parents:
diff changeset
782 R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
96a9758165cd Initial revision
carl
parents:
diff changeset
783 R@ $* $@ @ $1 ... and exit
96a9758165cd Initial revision
carl
parents:
diff changeset
784
96a9758165cd Initial revision
carl
parents:
diff changeset
785 # UUCP must always be presented in old form
96a9758165cd Initial revision
carl
parents:
diff changeset
786 R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
96a9758165cd Initial revision
carl
parents:
diff changeset
787
96a9758165cd Initial revision
carl
parents:
diff changeset
788 # delete duplicate local names
96a9758165cd Initial revision
carl
parents:
diff changeset
789 R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
96a9758165cd Initial revision
carl
parents:
diff changeset
790
96a9758165cd Initial revision
carl
parents:
diff changeset
791
96a9758165cd Initial revision
carl
parents:
diff changeset
792
96a9758165cd Initial revision
carl
parents:
diff changeset
793 ##############################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
794 ### Ruleset 97 -- recanonicalize and call ruleset zero ###
96a9758165cd Initial revision
carl
parents:
diff changeset
795 ### (used for recursive calls) ###
96a9758165cd Initial revision
carl
parents:
diff changeset
796 ##############################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
797
96a9758165cd Initial revision
carl
parents:
diff changeset
798 SRecurse=97
96a9758165cd Initial revision
carl
parents:
diff changeset
799 R$* $: $>canonify $1
96a9758165cd Initial revision
carl
parents:
diff changeset
800 R$* $@ $>parse $1
96a9758165cd Initial revision
carl
parents:
diff changeset
801
96a9758165cd Initial revision
carl
parents:
diff changeset
802
96a9758165cd Initial revision
carl
parents:
diff changeset
803 ######################################
96a9758165cd Initial revision
carl
parents:
diff changeset
804 ### Ruleset 0 -- Parse Address ###
96a9758165cd Initial revision
carl
parents:
diff changeset
805 ######################################
96a9758165cd Initial revision
carl
parents:
diff changeset
806
96a9758165cd Initial revision
carl
parents:
diff changeset
807 Sparse=0
96a9758165cd Initial revision
carl
parents:
diff changeset
808
96a9758165cd Initial revision
carl
parents:
diff changeset
809 R$* $: $>Parse0 $1 initial parsing
96a9758165cd Initial revision
carl
parents:
diff changeset
810 R<@> $#local $: <@> special case error msgs
96a9758165cd Initial revision
carl
parents:
diff changeset
811 R$* $: $>ParseLocal $1 handle local hacks
96a9758165cd Initial revision
carl
parents:
diff changeset
812 R$* $: $>Parse1 $1 final parsing
96a9758165cd Initial revision
carl
parents:
diff changeset
813
96a9758165cd Initial revision
carl
parents:
diff changeset
814 #
96a9758165cd Initial revision
carl
parents:
diff changeset
815 # Parse0 -- do initial syntax checking and eliminate local addresses.
96a9758165cd Initial revision
carl
parents:
diff changeset
816 # This should either return with the (possibly modified) input
96a9758165cd Initial revision
carl
parents:
diff changeset
817 # or return with a #error mailer. It should not return with a
96a9758165cd Initial revision
carl
parents:
diff changeset
818 # #mailer other than the #error mailer.
96a9758165cd Initial revision
carl
parents:
diff changeset
819 #
96a9758165cd Initial revision
carl
parents:
diff changeset
820
96a9758165cd Initial revision
carl
parents:
diff changeset
821 SParse0
96a9758165cd Initial revision
carl
parents:
diff changeset
822 R<@> $@ <@> special case error msgs
96a9758165cd Initial revision
carl
parents:
diff changeset
823 R$* : $* ; <@> $#error $@ 5.1.3 $: "553 List:; syntax illegal for recipient addresses"
96a9758165cd Initial revision
carl
parents:
diff changeset
824 R@ <@ $* > < @ $1 > catch "@@host" bogosity
96a9758165cd Initial revision
carl
parents:
diff changeset
825 R<@ $+> $#error $@ 5.1.3 $: "553 User address required"
96a9758165cd Initial revision
carl
parents:
diff changeset
826 R$+ <@> $#error $@ 5.1.3 $: "553 Hostname required"
96a9758165cd Initial revision
carl
parents:
diff changeset
827 R$* $: <> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
828 R<> $* < @ [ $* ] : $+ > $* $1 < @ [ $2 ] : $3 > $4
96a9758165cd Initial revision
carl
parents:
diff changeset
829 R<> $* < @ [ $* ] , $+ > $* $1 < @ [ $2 ] , $3 > $4
96a9758165cd Initial revision
carl
parents:
diff changeset
830 R<> $* < @ [ $* ] $+ > $* $#error $@ 5.1.2 $: "553 Invalid address"
96a9758165cd Initial revision
carl
parents:
diff changeset
831 R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
96a9758165cd Initial revision
carl
parents:
diff changeset
832 R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "553 Colon illegal in host name part"
96a9758165cd Initial revision
carl
parents:
diff changeset
833 R<> $* $1
96a9758165cd Initial revision
carl
parents:
diff changeset
834 R$* < @ . $* > $* $#error $@ 5.1.2 $: "553 Invalid host name"
96a9758165cd Initial revision
carl
parents:
diff changeset
835 R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "553 Invalid host name"
96a9758165cd Initial revision
carl
parents:
diff changeset
836 R$* < @ $* @ > $* $#error $@ 5.1.2 $: "553 Invalid route address"
96a9758165cd Initial revision
carl
parents:
diff changeset
837 R$* @ $* < @ $* > $* $#error $@ 5.1.3 $: "553 Invalid route address"
96a9758165cd Initial revision
carl
parents:
diff changeset
838 R$* , $~O $* $#error $@ 5.1.3 $: "553 Invalid route address"
96a9758165cd Initial revision
carl
parents:
diff changeset
839
96a9758165cd Initial revision
carl
parents:
diff changeset
840
96a9758165cd Initial revision
carl
parents:
diff changeset
841 # now delete the local info -- note $=O to find characters that cause forwarding
96a9758165cd Initial revision
carl
parents:
diff changeset
842 R$* < @ > $* $@ $>Parse0 $>canonify $1 user@ => user
96a9758165cd Initial revision
carl
parents:
diff changeset
843 R< @ $=w . > : $* $@ $>Parse0 $>canonify $2 @here:... -> ...
96a9758165cd Initial revision
carl
parents:
diff changeset
844 R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
96a9758165cd Initial revision
carl
parents:
diff changeset
845 R< @ $+ > $#error $@ 5.1.3 $: "553 User address required"
96a9758165cd Initial revision
carl
parents:
diff changeset
846 R$* $=O $* < @ $=w . > $@ $>Parse0 $>canonify $1 $2 $3 ...@here -> ...
96a9758165cd Initial revision
carl
parents:
diff changeset
847 R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
96a9758165cd Initial revision
carl
parents:
diff changeset
848 R< @ *LOCAL* > $#error $@ 5.1.3 $: "553 User address required"
96a9758165cd Initial revision
carl
parents:
diff changeset
849 R$* $=O $* < @ *LOCAL* >
96a9758165cd Initial revision
carl
parents:
diff changeset
850 $@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ...
96a9758165cd Initial revision
carl
parents:
diff changeset
851 R$* < @ *LOCAL* > $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
852
96a9758165cd Initial revision
carl
parents:
diff changeset
853 #
96a9758165cd Initial revision
carl
parents:
diff changeset
854 # Parse1 -- the bottom half of ruleset 0.
96a9758165cd Initial revision
carl
parents:
diff changeset
855 #
96a9758165cd Initial revision
carl
parents:
diff changeset
856
96a9758165cd Initial revision
carl
parents:
diff changeset
857 SParse1
96a9758165cd Initial revision
carl
parents:
diff changeset
858
96a9758165cd Initial revision
carl
parents:
diff changeset
859 # handle numeric address spec
96a9758165cd Initial revision
carl
parents:
diff changeset
860 R$* < @ [ $+ ] > $* $: $>ParseLocal $1 < @ [ $2 ] > $3 numeric internet spec
96a9758165cd Initial revision
carl
parents:
diff changeset
861 R$* < @ [ $+ ] > $* $1 < @ [ $2 ] : $S > $3 Add smart host to path
96a9758165cd Initial revision
carl
parents:
diff changeset
862 R$* < @ [ $+ ] : > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send
96a9758165cd Initial revision
carl
parents:
diff changeset
863 R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer
96a9758165cd Initial revision
carl
parents:
diff changeset
864 R$* < @ [ $+ ] : $+ > $* $#esmtp $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer
96a9758165cd Initial revision
carl
parents:
diff changeset
865
96a9758165cd Initial revision
carl
parents:
diff changeset
866 # handle virtual users
96a9758165cd Initial revision
carl
parents:
diff changeset
867 R$+ $: <!> $1 Mark for lookup
96a9758165cd Initial revision
carl
parents:
diff changeset
868 R<!> $+ < @ $={VirtHost} . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
869 R<!> $+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
870 R<@> $+ + $+ < @ $* . >
96a9758165cd Initial revision
carl
parents:
diff changeset
871 $: < $(virtuser $1 + + @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 + $2 < @ $3 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
872 R<@> $+ + $* < @ $* . >
96a9758165cd Initial revision
carl
parents:
diff changeset
873 $: < $(virtuser $1 + * @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 + $2 < @ $3 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
874 R<@> $+ + $* < @ $* . >
96a9758165cd Initial revision
carl
parents:
diff changeset
875 $: < $(virtuser $1 @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 + $2 < @ $3 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
876 R<@> $+ + $+ < @ $+ . > $: < $(virtuser + + @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 + $2 < @ $3 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
877 R<@> $+ + $* < @ $+ . > $: < $(virtuser + * @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 + $2 < @ $3 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
878 R<@> $+ + $* < @ $+ . > $: < $(virtuser @ $3 $@ $1 $@ $2 $@ +$2 $: ! $) > $1 + $2 < @ $3 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
879 R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
880 R<@> $+ $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
881 R<!> $+ $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
882 R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
96a9758165cd Initial revision
carl
parents:
diff changeset
883 R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
884 R< $+ > $+ < @ $+ > $: $>Recurse $1
96a9758165cd Initial revision
carl
parents:
diff changeset
885
96a9758165cd Initial revision
carl
parents:
diff changeset
886 # short circuit local delivery so forwarded email works
96a9758165cd Initial revision
carl
parents:
diff changeset
887
96a9758165cd Initial revision
carl
parents:
diff changeset
888
96a9758165cd Initial revision
carl
parents:
diff changeset
889 R$=L < @ $=w . > $#local $: @ $1 special local names
96a9758165cd Initial revision
carl
parents:
diff changeset
890 R$+ < @ $=w . > $#local $: $1 regular local name
96a9758165cd Initial revision
carl
parents:
diff changeset
891
96a9758165cd Initial revision
carl
parents:
diff changeset
892 # not local -- try mailer table lookup
96a9758165cd Initial revision
carl
parents:
diff changeset
893 R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name
96a9758165cd Initial revision
carl
parents:
diff changeset
894 R< $+ . > $* $: < $1 > $2 strip trailing dot
96a9758165cd Initial revision
carl
parents:
diff changeset
895 R< $+ > $* $: < $(mailertable $1 $) > $2 lookup
96a9758165cd Initial revision
carl
parents:
diff changeset
896 R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 check -- resolved?
96a9758165cd Initial revision
carl
parents:
diff changeset
897 R< $+ > $* $: $>Mailertable <$1> $2 try domain
96a9758165cd Initial revision
carl
parents:
diff changeset
898
96a9758165cd Initial revision
carl
parents:
diff changeset
899 # resolve remotely connected UUCP links (if any)
96a9758165cd Initial revision
carl
parents:
diff changeset
900
96a9758165cd Initial revision
carl
parents:
diff changeset
901 # resolve fake top level domains by forwarding to other hosts
96a9758165cd Initial revision
carl
parents:
diff changeset
902
96a9758165cd Initial revision
carl
parents:
diff changeset
903
96a9758165cd Initial revision
carl
parents:
diff changeset
904
96a9758165cd Initial revision
carl
parents:
diff changeset
905 # pass names that still have a host to a smarthost (if defined)
96a9758165cd Initial revision
carl
parents:
diff changeset
906 R$* < @ $* > $* $: $>MailerToTriple < $S > $1 < @ $2 > $3 glue on smarthost name
96a9758165cd Initial revision
carl
parents:
diff changeset
907
96a9758165cd Initial revision
carl
parents:
diff changeset
908 # deal with other remote names
96a9758165cd Initial revision
carl
parents:
diff changeset
909 R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
96a9758165cd Initial revision
carl
parents:
diff changeset
910
96a9758165cd Initial revision
carl
parents:
diff changeset
911 # handle locally delivered names
96a9758165cd Initial revision
carl
parents:
diff changeset
912 R$=L $#local $: @ $1 special local names
96a9758165cd Initial revision
carl
parents:
diff changeset
913 R$+ $#local $: $1 regular local names
96a9758165cd Initial revision
carl
parents:
diff changeset
914
96a9758165cd Initial revision
carl
parents:
diff changeset
915 ###########################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
916 ### Ruleset 5 -- special rewriting after aliases have been expanded ###
96a9758165cd Initial revision
carl
parents:
diff changeset
917 ###########################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
918
96a9758165cd Initial revision
carl
parents:
diff changeset
919 SLocal_localaddr
96a9758165cd Initial revision
carl
parents:
diff changeset
920 Slocaladdr=5
96a9758165cd Initial revision
carl
parents:
diff changeset
921 R$+ $: $1 $| $>"Local_localaddr" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
922 R$+ $| $#ok $@ $1 no change
96a9758165cd Initial revision
carl
parents:
diff changeset
923 R$+ $| $#$* $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
924 R$+ $| $* $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
925
96a9758165cd Initial revision
carl
parents:
diff changeset
926
96a9758165cd Initial revision
carl
parents:
diff changeset
927
96a9758165cd Initial revision
carl
parents:
diff changeset
928
96a9758165cd Initial revision
carl
parents:
diff changeset
929 # deal with plussed users so aliases work nicely
96a9758165cd Initial revision
carl
parents:
diff changeset
930 R$+ + * $#local $@ $&h $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
931 R$+ + $* $#local $@ + $2 $: $1 + *
96a9758165cd Initial revision
carl
parents:
diff changeset
932
96a9758165cd Initial revision
carl
parents:
diff changeset
933 # prepend an empty "forward host" on the front
96a9758165cd Initial revision
carl
parents:
diff changeset
934 R$+ $: <> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
935
96a9758165cd Initial revision
carl
parents:
diff changeset
936
96a9758165cd Initial revision
carl
parents:
diff changeset
937
96a9758165cd Initial revision
carl
parents:
diff changeset
938 R< > $+ $: < > < $1 <> $&h > nope, restore +detail
96a9758165cd Initial revision
carl
parents:
diff changeset
939
96a9758165cd Initial revision
carl
parents:
diff changeset
940 R< > < $+ <> + $* > $: < > < $1 + $2 > check whether +detail
96a9758165cd Initial revision
carl
parents:
diff changeset
941 R< > < $+ <> $* > $: < > < $1 > else discard
96a9758165cd Initial revision
carl
parents:
diff changeset
942 R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
96a9758165cd Initial revision
carl
parents:
diff changeset
943 R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
96a9758165cd Initial revision
carl
parents:
diff changeset
944 R< > < $+ > $@ $1 no +detail
96a9758165cd Initial revision
carl
parents:
diff changeset
945 R$+ $: $1 <> $&h add +detail back in
96a9758165cd Initial revision
carl
parents:
diff changeset
946
96a9758165cd Initial revision
carl
parents:
diff changeset
947 R$+ <> + $* $: $1 + $2 check whether +detail
96a9758165cd Initial revision
carl
parents:
diff changeset
948 R$+ <> $* $: $1 else discard
96a9758165cd Initial revision
carl
parents:
diff changeset
949 R< local : $* > $* $: $>MailerToTriple < local : $1 > $2 no host extension
96a9758165cd Initial revision
carl
parents:
diff changeset
950 R< error : $* > $* $: $>MailerToTriple < error : $1 > $2 no host extension
96a9758165cd Initial revision
carl
parents:
diff changeset
951
96a9758165cd Initial revision
carl
parents:
diff changeset
952 R< $~[ : $+ > $+ $: $>MailerToTriple < $1 : $2 > $3 < @ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
953
96a9758165cd Initial revision
carl
parents:
diff changeset
954 R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 >
96a9758165cd Initial revision
carl
parents:
diff changeset
955
96a9758165cd Initial revision
carl
parents:
diff changeset
956
96a9758165cd Initial revision
carl
parents:
diff changeset
957 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
958 ### Ruleset 90 -- try domain part of mailertable entry ###
96a9758165cd Initial revision
carl
parents:
diff changeset
959 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
960
96a9758165cd Initial revision
carl
parents:
diff changeset
961 SMailertable=90
96a9758165cd Initial revision
carl
parents:
diff changeset
962 R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4
96a9758165cd Initial revision
carl
parents:
diff changeset
963 R$* <$~[ : $* > $* $>MailerToTriple < $2 : $3 > $4 check -- resolved?
96a9758165cd Initial revision
carl
parents:
diff changeset
964 R$* < . $+ > $* $@ $>Mailertable $1 . <$2> $3 no -- strip & try again
96a9758165cd Initial revision
carl
parents:
diff changeset
965 R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "."
96a9758165cd Initial revision
carl
parents:
diff changeset
966 R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 "." found?
96a9758165cd Initial revision
carl
parents:
diff changeset
967 R< $* > $* $@ $2 no mailertable match
96a9758165cd Initial revision
carl
parents:
diff changeset
968
96a9758165cd Initial revision
carl
parents:
diff changeset
969 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
970 ### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
96a9758165cd Initial revision
carl
parents:
diff changeset
971 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
972
96a9758165cd Initial revision
carl
parents:
diff changeset
973 SMailerToTriple=95
96a9758165cd Initial revision
carl
parents:
diff changeset
974 R< > $* $@ $1 strip off null relay
96a9758165cd Initial revision
carl
parents:
diff changeset
975 R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
96a9758165cd Initial revision
carl
parents:
diff changeset
976 R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
977 R< local : $* > $* $>CanonLocal < $1 > $2
96a9758165cd Initial revision
carl
parents:
diff changeset
978 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
96a9758165cd Initial revision
carl
parents:
diff changeset
979 R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
96a9758165cd Initial revision
carl
parents:
diff changeset
980 R< $=w > $* $@ $2 delete local host
96a9758165cd Initial revision
carl
parents:
diff changeset
981 R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
96a9758165cd Initial revision
carl
parents:
diff changeset
982
96a9758165cd Initial revision
carl
parents:
diff changeset
983 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
984 ### Ruleset CanonLocal -- canonify local: syntax ###
96a9758165cd Initial revision
carl
parents:
diff changeset
985 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
986
96a9758165cd Initial revision
carl
parents:
diff changeset
987 SCanonLocal
96a9758165cd Initial revision
carl
parents:
diff changeset
988 # strip local host from routed addresses
96a9758165cd Initial revision
carl
parents:
diff changeset
989 R< $* > < @ $+ > : $+ $@ $>Recurse $3
96a9758165cd Initial revision
carl
parents:
diff changeset
990 R< $* > $+ $=O $+ < @ $+ > $@ $>Recurse $2 $3 $4
96a9758165cd Initial revision
carl
parents:
diff changeset
991
96a9758165cd Initial revision
carl
parents:
diff changeset
992 # strip trailing dot from any host name that may appear
96a9758165cd Initial revision
carl
parents:
diff changeset
993 R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
96a9758165cd Initial revision
carl
parents:
diff changeset
994
96a9758165cd Initial revision
carl
parents:
diff changeset
995 # handle local: syntax -- use old user, either with or without host
96a9758165cd Initial revision
carl
parents:
diff changeset
996 R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
997 R< > $+ $#local $@ $1 $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
998
96a9758165cd Initial revision
carl
parents:
diff changeset
999 # handle local:user@host syntax -- ignore host part
96a9758165cd Initial revision
carl
parents:
diff changeset
1000 R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1001
96a9758165cd Initial revision
carl
parents:
diff changeset
1002 # handle local:user syntax
96a9758165cd Initial revision
carl
parents:
diff changeset
1003 R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1004 R< $+ > $* $#local $@ $2 $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1005
96a9758165cd Initial revision
carl
parents:
diff changeset
1006 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1007 ### Ruleset 93 -- convert header names to masqueraded form ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1008 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1009
96a9758165cd Initial revision
carl
parents:
diff changeset
1010 SMasqHdr=93
96a9758165cd Initial revision
carl
parents:
diff changeset
1011
96a9758165cd Initial revision
carl
parents:
diff changeset
1012 # handle generics database
96a9758165cd Initial revision
carl
parents:
diff changeset
1013 R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark
96a9758165cd Initial revision
carl
parents:
diff changeset
1014 R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark
96a9758165cd Initial revision
carl
parents:
diff changeset
1015 R< $+ > $+ < $* > @ $: < $(generics $1 $: @ $1 $) > $2 < $3 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1016 R<@$+ + $* @ $+> $+ < @ $+ >
96a9758165cd Initial revision
carl
parents:
diff changeset
1017 $: < $(generics $1+*@$3 $@ $2 $:@$1 + $2@$3 $) > $4 < @ $5 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1018 R<@$+ + $* @ $+> $+ < @ $+ >
96a9758165cd Initial revision
carl
parents:
diff changeset
1019 $: < $(generics $1@$3 $: $) > $4 < @ $5 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1020 R<@$+ > $+ < @ $+ > $: < > $2 < @ $3 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1021 R< > $+ < @ $+ . > $: < $(generics @$2 $@ $1 $: $) > $1 < @ $2 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
1022 R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1023 R< > $+ + $* < @ $+ > $: < $(generics $1+* $@ $2 $: $) > $1 + $2 < @ $3 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1024 R< > $+ + $* < @ $+ > $: < $(generics $1 $: $) > $1 + $2 < @ $3 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1025 R< $* @ $* > $* < $* > $@ $>canonify $1 @ $2 found qualified
96a9758165cd Initial revision
carl
parents:
diff changeset
1026 R< $+ > $* < $* > $: $>canonify $1 @ *LOCAL* found unqualified
96a9758165cd Initial revision
carl
parents:
diff changeset
1027 R< > $* $: $1 not found
96a9758165cd Initial revision
carl
parents:
diff changeset
1028
96a9758165cd Initial revision
carl
parents:
diff changeset
1029 # do not masquerade anything in class N
96a9758165cd Initial revision
carl
parents:
diff changeset
1030 R$* < @ $* $=N . > $@ $1 < @ $2 $3 . >
96a9758165cd Initial revision
carl
parents:
diff changeset
1031
96a9758165cd Initial revision
carl
parents:
diff changeset
1032 R$* < @ *LOCAL* > $@ $1 < @ $j . >
96a9758165cd Initial revision
carl
parents:
diff changeset
1033
96a9758165cd Initial revision
carl
parents:
diff changeset
1034 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1035 ### Ruleset 94 -- convert envelope names to masqueraded form ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1036 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1037
96a9758165cd Initial revision
carl
parents:
diff changeset
1038 SMasqEnv=94
96a9758165cd Initial revision
carl
parents:
diff changeset
1039 R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1040
96a9758165cd Initial revision
carl
parents:
diff changeset
1041 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1042 ### Ruleset 98 -- local part of ruleset zero (can be null) ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1043 ###################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1044
96a9758165cd Initial revision
carl
parents:
diff changeset
1045 SParseLocal=98
96a9758165cd Initial revision
carl
parents:
diff changeset
1046
96a9758165cd Initial revision
carl
parents:
diff changeset
1047 # addresses sent to foo@host.REDIRECT will give a 551 error code
96a9758165cd Initial revision
carl
parents:
diff changeset
1048 R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
96a9758165cd Initial revision
carl
parents:
diff changeset
1049 R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
96a9758165cd Initial revision
carl
parents:
diff changeset
1050 R$* < @ $+ .REDIRECT. > < $- > $#error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1051
96a9758165cd Initial revision
carl
parents:
diff changeset
1052
96a9758165cd Initial revision
carl
parents:
diff changeset
1053
96a9758165cd Initial revision
carl
parents:
diff changeset
1054
96a9758165cd Initial revision
carl
parents:
diff changeset
1055 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1056 ### D: LookUpDomain -- search for domain in access database
96a9758165cd Initial revision
carl
parents:
diff changeset
1057 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1058 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1059 ### <$1> -- key (domain name)
96a9758165cd Initial revision
carl
parents:
diff changeset
1060 ### <$2> -- default (what to return if not found in db)
96a9758165cd Initial revision
carl
parents:
diff changeset
1061 ### <$3> -- mark (must be <(!|+) single-token>)
96a9758165cd Initial revision
carl
parents:
diff changeset
1062 ### ! does lookup only with tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1063 ### + does lookup with and without tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1064 ### <$4> -- passthru (additional data passed unchanged through)
96a9758165cd Initial revision
carl
parents:
diff changeset
1065 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1066
96a9758165cd Initial revision
carl
parents:
diff changeset
1067 SD
96a9758165cd Initial revision
carl
parents:
diff changeset
1068 R<$*> <$+> <$- $-> <$*> $: < $(access $4:$1 $: ? $) > <$1> <$2> <$3 $4> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1069 R<?> <$+> <$+> <+ $-> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <+ $3> <$4>
96a9758165cd Initial revision
carl
parents:
diff changeset
1070 R<?> <[$+.$-]> <$+> <$- $-> <$*> $@ $>D <[$1]> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1071 R<?> <[$+::$-]> <$+> <$- $-> <$*> $: $>D <[$1]> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1072 R<?> <[$+:$-]> <$+> <$- $-> <$*> $: $>D <[$1]> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1073 R<?> <$+.$+> <$+> <$- $-> <$*> $@ $>D <$2> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1074 R<?> <$+> <$+> <$- $-> <$*> $@ <$2> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1075 R<$* <TMPF>> <$+> <$+> <$- $-> <$*> $@ <<TMPF>> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1076 R<$*> <$+> <$+> <$- $-> <$*> $@ <$1> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1077
96a9758165cd Initial revision
carl
parents:
diff changeset
1078 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1079 ### A: LookUpAddress -- search for host address in access database
96a9758165cd Initial revision
carl
parents:
diff changeset
1080 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1081 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1082 ### <$1> -- key (dot quadded host address)
96a9758165cd Initial revision
carl
parents:
diff changeset
1083 ### <$2> -- default (what to return if not found in db)
96a9758165cd Initial revision
carl
parents:
diff changeset
1084 ### <$3> -- mark (must be <(!|+) single-token>)
96a9758165cd Initial revision
carl
parents:
diff changeset
1085 ### ! does lookup only with tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1086 ### + does lookup with and without tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1087 ### <$4> -- passthru (additional data passed through)
96a9758165cd Initial revision
carl
parents:
diff changeset
1088 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1089
96a9758165cd Initial revision
carl
parents:
diff changeset
1090 SA
96a9758165cd Initial revision
carl
parents:
diff changeset
1091 R<$+> <$+> <$- $-> <$*> $: < $(access $4:$1 $: ? $) > <$1> <$2> <$3 $4> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1092 R<?> <$+> <$+> <+ $-> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <+ $3> <$4>
96a9758165cd Initial revision
carl
parents:
diff changeset
1093 R<?> <$+::$-> <$+> <$- $-> <$*> $@ $>A <$1> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1094 R<?> <$+:$-> <$+> <$- $-> <$*> $@ $>A <$1> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1095 R<?> <$+.$-> <$+> <$- $-> <$*> $@ $>A <$1> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1096 R<?> <$+> <$+> <$- $-> <$*> $@ <$2> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1097 R<$* <TMPF>> <$+> <$+> <$- $-> <$*> $@ <<TMPF>> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1098 R<$*> <$+> <$+> <$- $-> <$*> $@ <$1> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1099
96a9758165cd Initial revision
carl
parents:
diff changeset
1100 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1101 ### CanonAddr -- Convert an address into a standard form for
96a9758165cd Initial revision
carl
parents:
diff changeset
1102 ### relay checking. Route address syntax is
96a9758165cd Initial revision
carl
parents:
diff changeset
1103 ### crudely converted into a %-hack address.
96a9758165cd Initial revision
carl
parents:
diff changeset
1104 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1105 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1106 ### $1 -- full recipient address
96a9758165cd Initial revision
carl
parents:
diff changeset
1107 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1108 ### Returns:
96a9758165cd Initial revision
carl
parents:
diff changeset
1109 ### parsed address, not in source route form
96a9758165cd Initial revision
carl
parents:
diff changeset
1110 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1111
96a9758165cd Initial revision
carl
parents:
diff changeset
1112 SCanonAddr
96a9758165cd Initial revision
carl
parents:
diff changeset
1113 R$* $: $>Parse0 $>canonify $1 make domain canonical
96a9758165cd Initial revision
carl
parents:
diff changeset
1114
96a9758165cd Initial revision
carl
parents:
diff changeset
1115
96a9758165cd Initial revision
carl
parents:
diff changeset
1116 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1117 ### ParseRecipient -- Strip off hosts in $=R as well as possibly
96a9758165cd Initial revision
carl
parents:
diff changeset
1118 ### $* $=m or the access database.
96a9758165cd Initial revision
carl
parents:
diff changeset
1119 ### Check user portion for host separators.
96a9758165cd Initial revision
carl
parents:
diff changeset
1120 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1121 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1122 ### $1 -- full recipient address
96a9758165cd Initial revision
carl
parents:
diff changeset
1123 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1124 ### Returns:
96a9758165cd Initial revision
carl
parents:
diff changeset
1125 ### parsed, non-local-relaying address
96a9758165cd Initial revision
carl
parents:
diff changeset
1126 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1127
96a9758165cd Initial revision
carl
parents:
diff changeset
1128 SParseRecipient
96a9758165cd Initial revision
carl
parents:
diff changeset
1129 R$* $: <?> $>CanonAddr $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1130 R<?> $* < @ $* . > <?> $1 < @ $2 > strip trailing dots
96a9758165cd Initial revision
carl
parents:
diff changeset
1131 R<?> $- < @ $* > $: <?> $(dequote $1 $) < @ $2 > dequote local part
96a9758165cd Initial revision
carl
parents:
diff changeset
1132
96a9758165cd Initial revision
carl
parents:
diff changeset
1133 # if no $=O character, no host in the user portion, we are done
96a9758165cd Initial revision
carl
parents:
diff changeset
1134 R<?> $* $=O $* < @ $* > $: <NO> $1 $2 $3 < @ $4>
96a9758165cd Initial revision
carl
parents:
diff changeset
1135 R<?> $* $@ $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1136
96a9758165cd Initial revision
carl
parents:
diff changeset
1137
96a9758165cd Initial revision
carl
parents:
diff changeset
1138 R<NO> $* < @ $=R > $: <RELAY> $1 < @ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1139 R<NO> $* < @ $+ > $: <$(access To:$2 $: NO $)> $1 < @ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1140 R<NO> $* < @ $+ > $: <$(access $2 $: NO $)> $1 < @ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1141
96a9758165cd Initial revision
carl
parents:
diff changeset
1142
96a9758165cd Initial revision
carl
parents:
diff changeset
1143
96a9758165cd Initial revision
carl
parents:
diff changeset
1144 R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1145 R<$+> $* $@ $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1146
96a9758165cd Initial revision
carl
parents:
diff changeset
1147
96a9758165cd Initial revision
carl
parents:
diff changeset
1148 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1149 ### check_relay -- check hostname/address on SMTP startup
96a9758165cd Initial revision
carl
parents:
diff changeset
1150 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1151
96a9758165cd Initial revision
carl
parents:
diff changeset
1152 SLocal_check_relay
96a9758165cd Initial revision
carl
parents:
diff changeset
1153 Scheckrelay
96a9758165cd Initial revision
carl
parents:
diff changeset
1154 R$* $: $1 $| $>"Local_check_relay" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1155 R$* $| $* $| $#$* $#$3
96a9758165cd Initial revision
carl
parents:
diff changeset
1156 R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1157
96a9758165cd Initial revision
carl
parents:
diff changeset
1158 SBasic_check_relay
96a9758165cd Initial revision
carl
parents:
diff changeset
1159 # check for deferred delivery mode
96a9758165cd Initial revision
carl
parents:
diff changeset
1160 R$* $: < $&{deliveryMode} > $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1161 R< d > $* $@ deferred
96a9758165cd Initial revision
carl
parents:
diff changeset
1162 R< $* > $* $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1163
96a9758165cd Initial revision
carl
parents:
diff changeset
1164 R$+ $| $+ $: $>D < $1 > <?> <+ Connect> < $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1165 R $| $+ $: $>A < $1 > <?> <+ Connect> <> empty client_name
96a9758165cd Initial revision
carl
parents:
diff changeset
1166 R<?> <$+> $: $>A < $1 > <?> <+ Connect> <> no: another lookup
96a9758165cd Initial revision
carl
parents:
diff changeset
1167 R<?> <$*> $: OK found nothing
96a9758165cd Initial revision
carl
parents:
diff changeset
1168 R<$={Accept}> <$*> $@ $1 return value of lookup
96a9758165cd Initial revision
carl
parents:
diff changeset
1169 R<REJECT> <$*> $#error $@ 5.7.1 $: "550 Access denied"
96a9758165cd Initial revision
carl
parents:
diff changeset
1170 R<DISCARD> <$*> $#discard $: discard
96a9758165cd Initial revision
carl
parents:
diff changeset
1171 R<ERROR:$-.$-.$-:$+> <$*> $#error $@ $1.$2.$3 $: $4
96a9758165cd Initial revision
carl
parents:
diff changeset
1172 R<ERROR:$+> <$*> $#error $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1173 R<$* <TMPF>> <$*> $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1174 R<$+> <$*> $#error $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1175
96a9758165cd Initial revision
carl
parents:
diff changeset
1176
96a9758165cd Initial revision
carl
parents:
diff changeset
1177
96a9758165cd Initial revision
carl
parents:
diff changeset
1178 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1179 ### check_mail -- check SMTP `MAIL FROM:' command argument
96a9758165cd Initial revision
carl
parents:
diff changeset
1180 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1181
96a9758165cd Initial revision
carl
parents:
diff changeset
1182 SLocal_check_mail
96a9758165cd Initial revision
carl
parents:
diff changeset
1183 Scheckmail
96a9758165cd Initial revision
carl
parents:
diff changeset
1184 R$* $: $1 $| $>"Local_check_mail" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1185 R$* $| $#$* $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1186 R$* $| $* $@ $>"Basic_check_mail" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1187
96a9758165cd Initial revision
carl
parents:
diff changeset
1188 SBasic_check_mail
96a9758165cd Initial revision
carl
parents:
diff changeset
1189 # check for deferred delivery mode
96a9758165cd Initial revision
carl
parents:
diff changeset
1190 R$* $: < $&{deliveryMode} > $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1191 R< d > $* $@ deferred
96a9758165cd Initial revision
carl
parents:
diff changeset
1192 R< $* > $* $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1193
96a9758165cd Initial revision
carl
parents:
diff changeset
1194 # authenticated?
96a9758165cd Initial revision
carl
parents:
diff changeset
1195 R$* $: $1 $| $>"tls_client" $&{verify} $| MAIL
96a9758165cd Initial revision
carl
parents:
diff changeset
1196 R$* $| $#$+ $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1197 R$* $| $* $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1198
96a9758165cd Initial revision
carl
parents:
diff changeset
1199 R<> $@ <OK> we MUST accept <> (RFC 1123)
96a9758165cd Initial revision
carl
parents:
diff changeset
1200 R$+ $: <?> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1201 R<?><$+> $: <@> <$1>
96a9758165cd Initial revision
carl
parents:
diff changeset
1202 R<?>$+ $: <@> <$1>
96a9758165cd Initial revision
carl
parents:
diff changeset
1203 R$* $: $&{daemon_flags} $| $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1204 R$* f $* $| <@> < $* @ $- > $: < ? $&{client_name} > < $3 @ $4 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1205 R$* u $* $| <@> < $* > $: <?> < $3 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1206 R$* $| $* $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1207 # handle case of @localhost on address
96a9758165cd Initial revision
carl
parents:
diff changeset
1208 R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost >
96a9758165cd Initial revision
carl
parents:
diff changeset
1209 R<@> < $* @ [127.0.0.1] >
96a9758165cd Initial revision
carl
parents:
diff changeset
1210 $: < ? $&{client_name} > < $1 @ [127.0.0.1] >
96a9758165cd Initial revision
carl
parents:
diff changeset
1211 R<@> < $* @ localhost.$m >
96a9758165cd Initial revision
carl
parents:
diff changeset
1212 $: < ? $&{client_name} > < $1 @ localhost.$m >
96a9758165cd Initial revision
carl
parents:
diff changeset
1213 R<@> < $* @ localhost.UUCP >
96a9758165cd Initial revision
carl
parents:
diff changeset
1214 $: < ? $&{client_name} > < $1 @ localhost.UUCP >
96a9758165cd Initial revision
carl
parents:
diff changeset
1215 R<@> $* $: $1 no localhost as domain
96a9758165cd Initial revision
carl
parents:
diff changeset
1216 R<? $=w> $* $: $2 local client: ok
96a9758165cd Initial revision
carl
parents:
diff changeset
1217 R<? $+> <$+> $#error $@ 5.5.4 $: "553 Real domain name required for sender address"
96a9758165cd Initial revision
carl
parents:
diff changeset
1218 R<?> $* $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1219 R$* $: <?> $>CanonAddr $1 canonify sender address and mark it
96a9758165cd Initial revision
carl
parents:
diff changeset
1220 R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
96a9758165cd Initial revision
carl
parents:
diff changeset
1221 # handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
96a9758165cd Initial revision
carl
parents:
diff changeset
1222 R<?> $* < @ $* $=P > $: <OKR> $1 < @ $2 $3 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1223 R<?> $* < @ $j > $: <OKR> $1 < @ $j >
96a9758165cd Initial revision
carl
parents:
diff changeset
1224 R<?> $* < @ $+ > $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1225 R<? $* <$->> $* < @ $+ >
96a9758165cd Initial revision
carl
parents:
diff changeset
1226 $: <$2> $3 < @ $4 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1227
96a9758165cd Initial revision
carl
parents:
diff changeset
1228 # check sender address: user@address, user@, address
96a9758165cd Initial revision
carl
parents:
diff changeset
1229 R<$+> $+ < @ $* > $: @<$1> <$2 < @ $3 >> $| <F:$2@$3> <U:$2@> <D:$3>
96a9758165cd Initial revision
carl
parents:
diff changeset
1230 R<$+> $+ $: @<$1> <$2> $| <U:$2@>
96a9758165cd Initial revision
carl
parents:
diff changeset
1231 R@ <$+> <$*> $| <$+> $: <@> <$1> <$2> $| $>SearchList <+ From> $| <$3> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1232 R<@> <$+> <$*> $| <$*> $: <$3> <$1> <$2> reverse result
96a9758165cd Initial revision
carl
parents:
diff changeset
1233 # retransform for further use
96a9758165cd Initial revision
carl
parents:
diff changeset
1234 R<?> <$+> <$*> $: <$1> $2 no match
96a9758165cd Initial revision
carl
parents:
diff changeset
1235 R<$+> <$+> <$*> $: <$1> $3 relevant result, keep it
96a9758165cd Initial revision
carl
parents:
diff changeset
1236
96a9758165cd Initial revision
carl
parents:
diff changeset
1237 # handle case of no @domain on address
96a9758165cd Initial revision
carl
parents:
diff changeset
1238 R<?> $* $: $&{daemon_flags} $| <?> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1239 R$* u $* $| <?> $* $: <OKR> $3
96a9758165cd Initial revision
carl
parents:
diff changeset
1240 R$* $| $* $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1241 R<?> $* $: < ? $&{client_addr} > $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1242 R<?> $* $@ <OKR> ...local unqualed ok
96a9758165cd Initial revision
carl
parents:
diff changeset
1243 R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required for sender address " $&f
96a9758165cd Initial revision
carl
parents:
diff changeset
1244 ...remote is not
96a9758165cd Initial revision
carl
parents:
diff changeset
1245 # check results
96a9758165cd Initial revision
carl
parents:
diff changeset
1246 R<?> $* $: @ $1 mark address: nothing known about it
96a9758165cd Initial revision
carl
parents:
diff changeset
1247 R<$={ResOk}> $* $@ <OKR> domain ok: stop
96a9758165cd Initial revision
carl
parents:
diff changeset
1248 R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
96a9758165cd Initial revision
carl
parents:
diff changeset
1249 R<PERM> $* $#error $@ 5.1.8 $: "553 Domain of sender address " $&f " does not exist"
96a9758165cd Initial revision
carl
parents:
diff changeset
1250 R<$={Accept}> $* $# $1 accept from access map
96a9758165cd Initial revision
carl
parents:
diff changeset
1251 R<DISCARD> $* $#discard $: discard
96a9758165cd Initial revision
carl
parents:
diff changeset
1252 R<REJECT> $* $#error $@ 5.7.1 $: "550 Access denied"
96a9758165cd Initial revision
carl
parents:
diff changeset
1253 R<ERROR:$-.$-.$-:$+> $* $#error $@ $1.$2.$3 $: $4
96a9758165cd Initial revision
carl
parents:
diff changeset
1254 R<ERROR:$+> $* $#error $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1255 R<<TMPF>> $* $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1256 R<$+> $* $#error $: $1 error from access db
96a9758165cd Initial revision
carl
parents:
diff changeset
1257
96a9758165cd Initial revision
carl
parents:
diff changeset
1258 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1259 ### check_rcpt -- check SMTP `RCPT TO:' command argument
96a9758165cd Initial revision
carl
parents:
diff changeset
1260 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1261
96a9758165cd Initial revision
carl
parents:
diff changeset
1262 SLocal_check_rcpt
96a9758165cd Initial revision
carl
parents:
diff changeset
1263 Scheckrcpt
96a9758165cd Initial revision
carl
parents:
diff changeset
1264 R$* $: $1 $| $>"Local_check_rcpt" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1265 R$* $| $#$* $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1266 R$* $| $* $@ $>"Basic_check_rcpt" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1267
96a9758165cd Initial revision
carl
parents:
diff changeset
1268 SBasic_check_rcpt
96a9758165cd Initial revision
carl
parents:
diff changeset
1269 # empty address?
96a9758165cd Initial revision
carl
parents:
diff changeset
1270 R<> $#error $@ nouser $: "553 User address required"
96a9758165cd Initial revision
carl
parents:
diff changeset
1271 R$@ $#error $@ nouser $: "553 User address required"
96a9758165cd Initial revision
carl
parents:
diff changeset
1272 # check for deferred delivery mode
96a9758165cd Initial revision
carl
parents:
diff changeset
1273 R$* $: < $&{deliveryMode} > $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1274 R< d > $* $@ deferred
96a9758165cd Initial revision
carl
parents:
diff changeset
1275 R< $* > $* $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1276
96a9758165cd Initial revision
carl
parents:
diff changeset
1277
96a9758165cd Initial revision
carl
parents:
diff changeset
1278 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1279 R$* $: $1 $| @ $>"Rcpt_ok" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1280 R$* $| @ $#TEMP $+ $: $1 $| T $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1281 R$* $| @ $#$* $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1282 R$* $| @ RELAY $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1283 R$* $| @ $* $: O $| $>"Relay_ok" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1284 R$* $| T $+ $: T $2 $| $>"Relay_ok" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1285 R$* $| $#TEMP $+ $#error $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1286 R$* $| $#$* $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1287 R$* $| RELAY $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1288 R T $+ $| $* $#error $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1289 # anything else is bogus
96a9758165cd Initial revision
carl
parents:
diff changeset
1290 R$* $#error $@ 5.7.1 $: "550 Relaying denied. Proper authentication required."
96a9758165cd Initial revision
carl
parents:
diff changeset
1291
96a9758165cd Initial revision
carl
parents:
diff changeset
1292
96a9758165cd Initial revision
carl
parents:
diff changeset
1293 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1294 ### Rcpt_ok: is the recipient ok?
96a9758165cd Initial revision
carl
parents:
diff changeset
1295 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1296 SRcpt_ok
96a9758165cd Initial revision
carl
parents:
diff changeset
1297 R$* $: $>ParseRecipient $1 strip relayable hosts
96a9758165cd Initial revision
carl
parents:
diff changeset
1298
96a9758165cd Initial revision
carl
parents:
diff changeset
1299
96a9758165cd Initial revision
carl
parents:
diff changeset
1300
96a9758165cd Initial revision
carl
parents:
diff changeset
1301
96a9758165cd Initial revision
carl
parents:
diff changeset
1302 # authenticated via TLS?
96a9758165cd Initial revision
carl
parents:
diff changeset
1303 R$* $: $1 $| $>RelayTLS client authenticated?
96a9758165cd Initial revision
carl
parents:
diff changeset
1304 R$* $| $# $+ $# $2 error/ok?
96a9758165cd Initial revision
carl
parents:
diff changeset
1305 R$* $| $* $: $1 no
96a9758165cd Initial revision
carl
parents:
diff changeset
1306
96a9758165cd Initial revision
carl
parents:
diff changeset
1307 R$* $: $1 $| $>"Local_Relay_Auth" $&{auth_type}
96a9758165cd Initial revision
carl
parents:
diff changeset
1308 R$* $| $# $* $# $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1309 R$* $| NO $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1310 R$* $| $* $: $1 $| $&{auth_type}
96a9758165cd Initial revision
carl
parents:
diff changeset
1311 R$* $| $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1312 R$* $| $={TrustAuthMech} $# RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1313 R$* $| $* $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1314 # anything terminating locally is ok
96a9758165cd Initial revision
carl
parents:
diff changeset
1315 R$+ < @ $=w > $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1316 R$+ < @ $=R > $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1317 R$+ < @ $+ > $: <$(access To:$2 $: ? $)> <$1 < @ $2 >>
96a9758165cd Initial revision
carl
parents:
diff changeset
1318 R<?> <$+ < @ $+ >> $: <$(access $2 $: ? $)> <$1 < @ $2 >>
96a9758165cd Initial revision
carl
parents:
diff changeset
1319 R<RELAY> $* $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1320 R<$* <TMPF>> $* $#TEMP $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1321 R<$*> <$*> $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1322
96a9758165cd Initial revision
carl
parents:
diff changeset
1323
96a9758165cd Initial revision
carl
parents:
diff changeset
1324
96a9758165cd Initial revision
carl
parents:
diff changeset
1325 # check for local user (i.e. unqualified address)
96a9758165cd Initial revision
carl
parents:
diff changeset
1326 R$* $: <?> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1327 R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1328 # local user is ok
96a9758165cd Initial revision
carl
parents:
diff changeset
1329 R<?> $+ $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1330 R<$+> $* $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1331
96a9758165cd Initial revision
carl
parents:
diff changeset
1332 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1333 ### Relay_ok: is the relay/sender ok?
96a9758165cd Initial revision
carl
parents:
diff changeset
1334 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1335 SRelay_ok
96a9758165cd Initial revision
carl
parents:
diff changeset
1336 # anything originating locally is ok
96a9758165cd Initial revision
carl
parents:
diff changeset
1337 # check IP address
96a9758165cd Initial revision
carl
parents:
diff changeset
1338 R$* $: $&{client_addr}
96a9758165cd Initial revision
carl
parents:
diff changeset
1339 R$@ $@ RELAY originated locally
96a9758165cd Initial revision
carl
parents:
diff changeset
1340 R0 $@ RELAY originated locally
96a9758165cd Initial revision
carl
parents:
diff changeset
1341 R127.0.0.1 $@ RELAY originated locally
96a9758165cd Initial revision
carl
parents:
diff changeset
1342 RIPv6:::1 $@ RELAY originated locally
96a9758165cd Initial revision
carl
parents:
diff changeset
1343 R$=R $* $@ RELAY relayable IP address
96a9758165cd Initial revision
carl
parents:
diff changeset
1344 R$* $: $>A <$1> <?> <+ Connect> <$1>
96a9758165cd Initial revision
carl
parents:
diff changeset
1345 R<RELAY> $* $@ RELAY relayable IP address
96a9758165cd Initial revision
carl
parents:
diff changeset
1346
96a9758165cd Initial revision
carl
parents:
diff changeset
1347 R<<TMPF>> $* $#TEMP $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1348 R<$*> <$*> $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1349 R$* $: [ $1 ] put brackets around it...
96a9758165cd Initial revision
carl
parents:
diff changeset
1350 R$=w $@ RELAY ... and see if it is local
96a9758165cd Initial revision
carl
parents:
diff changeset
1351
96a9758165cd Initial revision
carl
parents:
diff changeset
1352
96a9758165cd Initial revision
carl
parents:
diff changeset
1353 # check client name: first: did it resolve?
96a9758165cd Initial revision
carl
parents:
diff changeset
1354 R$* $: < $&{client_resolve} >
96a9758165cd Initial revision
carl
parents:
diff changeset
1355 R<TEMP> $#TEMP $@ 4.7.1 $: "450 Relaying temporarily denied. Cannot resolve PTR record for " $&{client_addr}
96a9758165cd Initial revision
carl
parents:
diff changeset
1356 R<FORGED> $#error $@ 5.7.1 $: "550 Relaying denied. IP name possibly forged " $&{client_name}
96a9758165cd Initial revision
carl
parents:
diff changeset
1357 R<FAIL> $#error $@ 5.7.1 $: "550 Relaying denied. IP name lookup failed " $&{client_name}
96a9758165cd Initial revision
carl
parents:
diff changeset
1358 R$* $: <@> $&{client_name}
96a9758165cd Initial revision
carl
parents:
diff changeset
1359 # pass to name server to make hostname canonical
96a9758165cd Initial revision
carl
parents:
diff changeset
1360 R<@> $* $=P $:<?> $1 $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1361 R<@> $+ $:<?> $[ $1 $]
96a9758165cd Initial revision
carl
parents:
diff changeset
1362 R$* . $1 strip trailing dots
96a9758165cd Initial revision
carl
parents:
diff changeset
1363 R<?> $=w $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1364 R<?> $=R $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1365 R<?> $* $: <$(access Connect:$1 $: ? $)> <$1>
96a9758165cd Initial revision
carl
parents:
diff changeset
1366 R<?> <$*> $: <$(access $1 $: ? $)> <$1>
96a9758165cd Initial revision
carl
parents:
diff changeset
1367 R<RELAY> $* $@ RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1368 R<$* <TMPF>> $* $#TEMP $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1369 R<$*> <$*> $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1370
96a9758165cd Initial revision
carl
parents:
diff changeset
1371 # turn a canonical address in the form user<@domain>
96a9758165cd Initial revision
carl
parents:
diff changeset
1372 # qualify unqual. addresses with $j
96a9758165cd Initial revision
carl
parents:
diff changeset
1373 SFullAddr
96a9758165cd Initial revision
carl
parents:
diff changeset
1374 R$* <@ $+ . > $1 <@ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1375 R$* <@ $* > $@ $1 <@ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1376 R$+ $@ $1 <@ $j >
96a9758165cd Initial revision
carl
parents:
diff changeset
1377
96a9758165cd Initial revision
carl
parents:
diff changeset
1378 SDelay_TLS_Client
96a9758165cd Initial revision
carl
parents:
diff changeset
1379 # authenticated?
96a9758165cd Initial revision
carl
parents:
diff changeset
1380 R$* $: $1 $| $>"tls_client" $&{verify} $| MAIL
96a9758165cd Initial revision
carl
parents:
diff changeset
1381 R$* $| $#$+ $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1382 R$* $# $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1383
96a9758165cd Initial revision
carl
parents:
diff changeset
1384 SDelay_TLS_Client2
96a9758165cd Initial revision
carl
parents:
diff changeset
1385 # authenticated?
96a9758165cd Initial revision
carl
parents:
diff changeset
1386 R$* $: $1 $| $>"tls_client" $&{verify} $| MAIL
96a9758165cd Initial revision
carl
parents:
diff changeset
1387 R$* $| $#$+ $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1388 R$* $@ $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1389
96a9758165cd Initial revision
carl
parents:
diff changeset
1390 # call all necessary rulesets
96a9758165cd Initial revision
carl
parents:
diff changeset
1391 Scheck_rcpt
96a9758165cd Initial revision
carl
parents:
diff changeset
1392 # R$@ $#error $@ 5.1.3 $: "553 Recipient address required"
96a9758165cd Initial revision
carl
parents:
diff changeset
1393
96a9758165cd Initial revision
carl
parents:
diff changeset
1394 R$+ $: $1 $| $>checkrcpt $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1395 R$+ $| $#error $* $#error $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1396 R$+ $| $#discard $* $#discard $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1397 R$+ $| $#$* $@ $>"Delay_TLS_Client" $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1398 R$+ $| $* $: <?> $>FullAddr $>CanonAddr $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1399 R<?> $+ < @ $=w > $: <> $1 < @ $2 > $| <F: $1@$2 > <D: $2 > <U: $1@>
96a9758165cd Initial revision
carl
parents:
diff changeset
1400 R<?> $+ < @ $* > $: <> $1 < @ $2 > $| <F: $1@$2 > <D: $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1401 # lookup the addresses only with Spam tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1402 R<> $* $| <$+> $: <@> $1 $| $>SearchList <! Spam> $| <$2> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1403 R<@> $* $| $* $: $2 $1 reverse result
96a9758165cd Initial revision
carl
parents:
diff changeset
1404 # is the recipient a spam friend?
96a9758165cd Initial revision
carl
parents:
diff changeset
1405 R<FRIEND> $+ $@ $>"Delay_TLS_Client2" SPAMFRIEND
96a9758165cd Initial revision
carl
parents:
diff changeset
1406 R<$*> $+ $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1407 R$* $: $1 $| $>checkmail <$&f>
96a9758165cd Initial revision
carl
parents:
diff changeset
1408 R$* $| $#$* $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1409 R$* $| $* $: $1 $| $>checkrelay $&{client_name} $| $&{client_addr}
96a9758165cd Initial revision
carl
parents:
diff changeset
1410 R$* $| $#$* $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1411 R$* $| $* $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1412
96a9758165cd Initial revision
carl
parents:
diff changeset
1413
96a9758165cd Initial revision
carl
parents:
diff changeset
1414 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1415 ### F: LookUpFull -- search for an entry in access database
96a9758165cd Initial revision
carl
parents:
diff changeset
1416 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1417 ### lookup of full key (which should be an address) and
96a9758165cd Initial revision
carl
parents:
diff changeset
1418 ### variations if +detail exists: +* and without +detail
96a9758165cd Initial revision
carl
parents:
diff changeset
1419 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1420 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1421 ### <$1> -- key
96a9758165cd Initial revision
carl
parents:
diff changeset
1422 ### <$2> -- default (what to return if not found in db)
96a9758165cd Initial revision
carl
parents:
diff changeset
1423 ### <$3> -- mark (must be <(!|+) single-token>)
96a9758165cd Initial revision
carl
parents:
diff changeset
1424 ### ! does lookup only with tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1425 ### + does lookup with and without tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1426 ### <$4> -- passthru (additional data passed unchanged through)
96a9758165cd Initial revision
carl
parents:
diff changeset
1427 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1428
96a9758165cd Initial revision
carl
parents:
diff changeset
1429 SF
96a9758165cd Initial revision
carl
parents:
diff changeset
1430 R<$+> <$*> <$- $-> <$*> $: <$(access $4:$1 $: ? $)> <$1> <$2> <$3 $4> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1431 R<?> <$+> <$*> <+ $-> <$*> $: <$(access $1 $: ? $)> <$1> <$2> <+ $3> <$4>
96a9758165cd Initial revision
carl
parents:
diff changeset
1432 R<?> <$+ + $* @ $+> <$*> <$- $-> <$*>
96a9758165cd Initial revision
carl
parents:
diff changeset
1433 $: <$(access $6:$1+*@$3 $: ? $)> <$1+$2@$3> <$4> <$5 $6> <$7>
96a9758165cd Initial revision
carl
parents:
diff changeset
1434 R<?> <$+ + $* @ $+> <$*> <+ $-> <$*>
96a9758165cd Initial revision
carl
parents:
diff changeset
1435 $: <$(access $1+*@$3 $: ? $)> <$1+$2@$3> <$4> <+ $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1436 R<?> <$+ + $* @ $+> <$*> <$- $-> <$*>
96a9758165cd Initial revision
carl
parents:
diff changeset
1437 $: <$(access $6:$1@$3 $: ? $)> <$1+$2@$3> <$4> <$5 $6> <$7>
96a9758165cd Initial revision
carl
parents:
diff changeset
1438 R<?> <$+ + $* @ $+> <$*> <+ $-> <$*>
96a9758165cd Initial revision
carl
parents:
diff changeset
1439 $: <$(access $1@$3 $: ? $)> <$1+$2@$3> <$4> <+ $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1440 R<?> <$+> <$*> <$- $-> <$*> $@ <$2> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1441 R<$+ <TMPF>> <$*> <$- $-> <$*> $@ <<TMPF>> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1442 R<$+> <$*> <$- $-> <$*> $@ <$1> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1443
96a9758165cd Initial revision
carl
parents:
diff changeset
1444 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1445 ### E: LookUpExact -- search for an entry in access database
96a9758165cd Initial revision
carl
parents:
diff changeset
1446 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1447 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1448 ### <$1> -- key
96a9758165cd Initial revision
carl
parents:
diff changeset
1449 ### <$2> -- default (what to return if not found in db)
96a9758165cd Initial revision
carl
parents:
diff changeset
1450 ### <$3> -- mark (must be <(!|+) single-token>)
96a9758165cd Initial revision
carl
parents:
diff changeset
1451 ### ! does lookup only with tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1452 ### + does lookup with and without tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1453 ### <$4> -- passthru (additional data passed unchanged through)
96a9758165cd Initial revision
carl
parents:
diff changeset
1454 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1455
96a9758165cd Initial revision
carl
parents:
diff changeset
1456 SE
96a9758165cd Initial revision
carl
parents:
diff changeset
1457 R<$*> <$*> <$- $-> <$*> $: <$(access $4:$1 $: ? $)> <$1> <$2> <$3 $4> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1458 R<?> <$+> <$*> <+ $-> <$*> $: <$(access $1 $: ? $)> <$1> <$2> <+ $3> <$4>
96a9758165cd Initial revision
carl
parents:
diff changeset
1459 R<?> <$+> <$*> <$- $-> <$*> $@ <$2> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1460 R<$+ <TMPF>> <$*> <$- $-> <$*> $@ <<TMPF>> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1461 R<$+> <$*> <$- $-> <$*> $@ <$1> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1462
96a9758165cd Initial revision
carl
parents:
diff changeset
1463 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1464 ### U: LookUpUser -- search for an entry in access database
96a9758165cd Initial revision
carl
parents:
diff changeset
1465 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1466 ### lookup of key (which should be a local part) and
96a9758165cd Initial revision
carl
parents:
diff changeset
1467 ### variations if +detail exists: +* and without +detail
96a9758165cd Initial revision
carl
parents:
diff changeset
1468 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1469 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1470 ### <$1> -- key (user@)
96a9758165cd Initial revision
carl
parents:
diff changeset
1471 ### <$2> -- default (what to return if not found in db)
96a9758165cd Initial revision
carl
parents:
diff changeset
1472 ### <$3> -- mark (must be <(!|+) single-token>)
96a9758165cd Initial revision
carl
parents:
diff changeset
1473 ### ! does lookup only with tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1474 ### + does lookup with and without tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1475 ### <$4> -- passthru (additional data passed unchanged through)
96a9758165cd Initial revision
carl
parents:
diff changeset
1476 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1477
96a9758165cd Initial revision
carl
parents:
diff changeset
1478 SU
96a9758165cd Initial revision
carl
parents:
diff changeset
1479 R<$+> <$*> <$- $-> <$*> $: <$(access $4:$1 $: ? $)> <$1> <$2> <$3 $4> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1480 R<?> <$+> <$*> <+ $-> <$*> $: <$(access $1 $: ? $)> <$1> <$2> <+ $3> <$4>
96a9758165cd Initial revision
carl
parents:
diff changeset
1481 R<?> <$+ + $* @> <$*> <$- $-> <$*>
96a9758165cd Initial revision
carl
parents:
diff changeset
1482 $: <$(access $5:$1+*@ $: ? $)> <$1+$2@> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1483 R<?> <$+ + $* @> <$*> <+ $-> <$*>
96a9758165cd Initial revision
carl
parents:
diff changeset
1484 $: <$(access $1+*@ $: ? $)> <$1+$2@> <$3> <+ $4> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1485 R<?> <$+ + $* @> <$*> <$- $-> <$*>
96a9758165cd Initial revision
carl
parents:
diff changeset
1486 $: <$(access $5:$1@ $: ? $)> <$1+$2@> <$3> <$4 $5> <$6>
96a9758165cd Initial revision
carl
parents:
diff changeset
1487 R<?> <$+ + $* @> <$*> <+ $-> <$*>
96a9758165cd Initial revision
carl
parents:
diff changeset
1488 $: <$(access $1@ $: ? $)> <$1+$2@> <$3> <+ $4> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1489 R<?> <$+> <$*> <$- $-> <$*> $@ <$2> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1490 R<$+ <TMPF>> <$*> <$- $-> <$*> $@ <<TMPF>> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1491 R<$+> <$*> <$- $-> <$*> $@ <$1> <$5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1492
96a9758165cd Initial revision
carl
parents:
diff changeset
1493 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1494 ### SearchList: search a list of items in the access map
96a9758165cd Initial revision
carl
parents:
diff changeset
1495 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1496 ### <exact tag> $| <mark:address> <mark:address> ... <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1497 ### where "exact" is either "+" or "!":
96a9758165cd Initial revision
carl
parents:
diff changeset
1498 ### <+ TAG> lookup with and w/o tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1499 ### <! TAG> lookup with tag
96a9758165cd Initial revision
carl
parents:
diff changeset
1500 ### possible values for "mark" are:
96a9758165cd Initial revision
carl
parents:
diff changeset
1501 ### D: recursive host lookup (LookUpDomain)
96a9758165cd Initial revision
carl
parents:
diff changeset
1502 ### E: exact lookup, no modifications
96a9758165cd Initial revision
carl
parents:
diff changeset
1503 ### F: full lookup, try user+ext@domain and user@domain
96a9758165cd Initial revision
carl
parents:
diff changeset
1504 ### U: user lookup, try user+ext and user (input must have trailing @)
96a9758165cd Initial revision
carl
parents:
diff changeset
1505 ### return: <RHS of lookup> or <?> (not found)
96a9758165cd Initial revision
carl
parents:
diff changeset
1506 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1507
96a9758165cd Initial revision
carl
parents:
diff changeset
1508 # class with valid marks for SearchList
96a9758165cd Initial revision
carl
parents:
diff changeset
1509 C{src}E F D U
96a9758165cd Initial revision
carl
parents:
diff changeset
1510 SSearchList
96a9758165cd Initial revision
carl
parents:
diff changeset
1511 # just call the ruleset with the name of the tag... nice trick...
96a9758165cd Initial revision
carl
parents:
diff changeset
1512 R<$+> $| <$={src}:$*> <$*> $: <$1> $| <$4> $| $>$2 <$3> <?> <$1> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1513 R<$+> $| <> $| <?> <> $@ <?>
96a9758165cd Initial revision
carl
parents:
diff changeset
1514 R<$+> $| <$+> $| <?> <> $@ $>SearchList <$1> $| <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1515 R<$+> $| <$*> $| <$+> <> $@ <$3>
96a9758165cd Initial revision
carl
parents:
diff changeset
1516 R<$+> $| <$+> $@ <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1517
96a9758165cd Initial revision
carl
parents:
diff changeset
1518
96a9758165cd Initial revision
carl
parents:
diff changeset
1519 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1520 ### trust_auth: is user trusted to authenticate as someone else?
96a9758165cd Initial revision
carl
parents:
diff changeset
1521 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1522 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1523 ### $1: AUTH= parameter from MAIL command
96a9758165cd Initial revision
carl
parents:
diff changeset
1524 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1525
96a9758165cd Initial revision
carl
parents:
diff changeset
1526 SLocal_trust_auth
96a9758165cd Initial revision
carl
parents:
diff changeset
1527 Strust_auth
96a9758165cd Initial revision
carl
parents:
diff changeset
1528 R$* $: $&{auth_type} $| $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1529 # required by RFC 2554 section 4.
96a9758165cd Initial revision
carl
parents:
diff changeset
1530 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated"
96a9758165cd Initial revision
carl
parents:
diff changeset
1531 R$* $| $&{auth_authen} $@ identical
96a9758165cd Initial revision
carl
parents:
diff changeset
1532 R$* $| <$&{auth_authen}> $@ identical
96a9758165cd Initial revision
carl
parents:
diff changeset
1533 R$* $| $* $: $1 $| $>"Local_trust_auth" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1534 R$* $| $#$* $#$2
96a9758165cd Initial revision
carl
parents:
diff changeset
1535 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author}
96a9758165cd Initial revision
carl
parents:
diff changeset
1536
96a9758165cd Initial revision
carl
parents:
diff changeset
1537 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1538 ### Relay_Auth: allow relaying based on authentication?
96a9758165cd Initial revision
carl
parents:
diff changeset
1539 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1540 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1541 ### $1: ${auth_type}
96a9758165cd Initial revision
carl
parents:
diff changeset
1542 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1543 SLocal_Relay_Auth
96a9758165cd Initial revision
carl
parents:
diff changeset
1544
96a9758165cd Initial revision
carl
parents:
diff changeset
1545 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1546 ### srv_features: which features to offer to a client?
96a9758165cd Initial revision
carl
parents:
diff changeset
1547 ### (done in server)
96a9758165cd Initial revision
carl
parents:
diff changeset
1548 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1549 Ssrv_features
96a9758165cd Initial revision
carl
parents:
diff changeset
1550 R$* $: $>D <$&{client_name}> <?> <! "Srv_Features"> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1551 R<?>$* $: $>A <$&{client_addr}> <?> <! "Srv_Features"> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1552 R<?>$* $: <$(access "Srv_Features": $: ? $)>
96a9758165cd Initial revision
carl
parents:
diff changeset
1553 R<?>$* $@ OK
96a9758165cd Initial revision
carl
parents:
diff changeset
1554 R<$* <TMPF>>$* $#temp
96a9758165cd Initial revision
carl
parents:
diff changeset
1555 R<$+>$* $# $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1556
96a9758165cd Initial revision
carl
parents:
diff changeset
1557 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1558 ### try_tls: try to use STARTTLS?
96a9758165cd Initial revision
carl
parents:
diff changeset
1559 ### (done in client)
96a9758165cd Initial revision
carl
parents:
diff changeset
1560 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1561 Stry_tls
96a9758165cd Initial revision
carl
parents:
diff changeset
1562 R$* $: $>D <$&{server_name}> <?> <! "Try_TLS"> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1563 R<?>$* $: $>A <$&{server_addr}> <?> <! "Try_TLS"> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1564 R<?>$* $: <$(access "Try_TLS": $: ? $)>
96a9758165cd Initial revision
carl
parents:
diff changeset
1565 R<?>$* $@ OK
96a9758165cd Initial revision
carl
parents:
diff changeset
1566 R<$* <TMPF>>$* $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1567 R<NO>$* $#error $@ 5.7.1 $: "550 do not try TLS with " $&{server_name} " ["$&{server_addr}"]"
96a9758165cd Initial revision
carl
parents:
diff changeset
1568
96a9758165cd Initial revision
carl
parents:
diff changeset
1569 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1570 ### tls_rcpt: is connection with server "good" enough?
96a9758165cd Initial revision
carl
parents:
diff changeset
1571 ### (done in client, per recipient)
96a9758165cd Initial revision
carl
parents:
diff changeset
1572 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1573 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1574 ### $1: recipient
96a9758165cd Initial revision
carl
parents:
diff changeset
1575 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1576 Stls_rcpt
96a9758165cd Initial revision
carl
parents:
diff changeset
1577 R$* $: $(macro {TLS_Name} $@ $&{server_name} $) $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1578 R$+ $: <?> $>CanonAddr $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1579 R<?> $+ < @ $+ . > <?> $1 <@ $2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1580 R<?> $+ < @ $+ > $: $1 <@ $2 > $| <F:$1@$2> <U:$1@> <D:$2> <E:>
96a9758165cd Initial revision
carl
parents:
diff changeset
1581 R<?> $+ $: $1 $| <U:$1@> <E:>
96a9758165cd Initial revision
carl
parents:
diff changeset
1582 R$* $| $+ $: $1 $| $>SearchList <! "TLS_Rcpt"> $| $2 <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1583 R$* $| <?> $@ OK
96a9758165cd Initial revision
carl
parents:
diff changeset
1584 R$* $| <$* <TMPF>> $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1585 R$* $| <$+> $@ $>"TLS_connection" $&{verify} $| <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1586
96a9758165cd Initial revision
carl
parents:
diff changeset
1587 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1588 ### tls_client: is connection with client "good" enough?
96a9758165cd Initial revision
carl
parents:
diff changeset
1589 ### (done in server)
96a9758165cd Initial revision
carl
parents:
diff changeset
1590 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1591 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1592 ### ${verify} $| (MAIL|STARTTLS)
96a9758165cd Initial revision
carl
parents:
diff changeset
1593 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1594 Stls_client
96a9758165cd Initial revision
carl
parents:
diff changeset
1595 R$* $: $(macro {TLS_Name} $@ $&{server_name} $) $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1596 R$* $| $* $: $1 $| $>D <$&{client_name}> <?> <! "TLS_Clt"> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1597 R$* $| <?>$* $: $1 $| $>A <$&{client_addr}> <?> <! "TLS_Clt"> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1598 R$* $| <?>$* $: $1 $| <$(access "TLS_Clt": $: ? $)>
96a9758165cd Initial revision
carl
parents:
diff changeset
1599 R$* $| <$* <TMPF>> $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1600 R$* $@ $>"TLS_connection" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1601
96a9758165cd Initial revision
carl
parents:
diff changeset
1602 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1603 ### tls_server: is connection with server "good" enough?
96a9758165cd Initial revision
carl
parents:
diff changeset
1604 ### (done in client)
96a9758165cd Initial revision
carl
parents:
diff changeset
1605 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1606 ### Parameter:
96a9758165cd Initial revision
carl
parents:
diff changeset
1607 ### ${verify}
96a9758165cd Initial revision
carl
parents:
diff changeset
1608 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1609 Stls_server
96a9758165cd Initial revision
carl
parents:
diff changeset
1610 R$* $: $(macro {TLS_Name} $@ $&{server_name} $) $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1611 R$* $: $1 $| $>D <$&{server_name}> <?> <! "TLS_Srv"> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1612 R$* $| <?>$* $: $1 $| $>A <$&{server_addr}> <?> <! "TLS_Srv"> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1613 R$* $| <?>$* $: $1 $| <$(access "TLS_Srv": $: ? $)>
96a9758165cd Initial revision
carl
parents:
diff changeset
1614 R$* $| <$* <TMPF>> $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
96a9758165cd Initial revision
carl
parents:
diff changeset
1615 R$* $@ $>"TLS_connection" $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1616
96a9758165cd Initial revision
carl
parents:
diff changeset
1617 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1618 ### TLS_connection: is TLS connection "good" enough?
96a9758165cd Initial revision
carl
parents:
diff changeset
1619 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1620 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1621 ### ${verify} $| <Requirement> [<>]
96a9758165cd Initial revision
carl
parents:
diff changeset
1622 ### Requirement: RHS from access map, may be ? for none.
96a9758165cd Initial revision
carl
parents:
diff changeset
1623 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1624 STLS_connection
96a9758165cd Initial revision
carl
parents:
diff changeset
1625 R$* $| <$*>$* $: $1 $| <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1626 # create the appropriate error codes
96a9758165cd Initial revision
carl
parents:
diff changeset
1627 R$* $| <PERM + $={tls} $*> $: $1 $| <503:5.7.0> <$2 $3>
96a9758165cd Initial revision
carl
parents:
diff changeset
1628 R$* $| <TEMP + $={tls} $*> $: $1 $| <403:4.7.0> <$2 $3>
96a9758165cd Initial revision
carl
parents:
diff changeset
1629 R$* $| <$={tls} $*> $: $1 $| <403:4.7.0> <$2 $3>
96a9758165cd Initial revision
carl
parents:
diff changeset
1630 # deal with TLS handshake failures: abort
96a9758165cd Initial revision
carl
parents:
diff changeset
1631 RSOFTWARE $| <$-:$+> $* $#error $@ $2 $: $1 " TLS handshake failed."
96a9758165cd Initial revision
carl
parents:
diff changeset
1632 RSOFTWARE $| $* $#error $@ 4.7.0 $: "403 TLS handshake failed."
96a9758165cd Initial revision
carl
parents:
diff changeset
1633 R$* $| <$*> <VERIFY> $: <$2> <VERIFY> <> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1634 R$* $| <$*> <VERIFY + $+> $: <$2> <VERIFY> <$3> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1635 R$* $| <$*> <$={tls}:$->$* $: <$2> <$3:$4> <> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1636 R$* $| <$*> <$={tls}:$- + $+>$* $: <$2> <$3:$4> <$5> $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1637 R$* $| $* $@ OK
96a9758165cd Initial revision
carl
parents:
diff changeset
1638 # authentication required: give appropriate error
96a9758165cd Initial revision
carl
parents:
diff changeset
1639 # other side did authenticate (via STARTTLS)
96a9758165cd Initial revision
carl
parents:
diff changeset
1640 R<$*><VERIFY> <> OK $@ OK
96a9758165cd Initial revision
carl
parents:
diff changeset
1641 R<$*><VERIFY> <$+> OK $: <$1> <REQ:0> <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1642 R<$*><VERIFY:$-> <$*> OK $: <$1> <REQ:$2> <$3>
96a9758165cd Initial revision
carl
parents:
diff changeset
1643 R<$*><ENCR:$-> <$*> $* $: <$1> <REQ:$2> <$3>
96a9758165cd Initial revision
carl
parents:
diff changeset
1644 R<$-:$+><VERIFY $*> <$*> $#error $@ $2 $: $1 " authentication required"
96a9758165cd Initial revision
carl
parents:
diff changeset
1645 R<$-:$+><VERIFY $*> <$*> FAIL $#error $@ $2 $: $1 " authentication failed"
96a9758165cd Initial revision
carl
parents:
diff changeset
1646 R<$-:$+><VERIFY $*> <$*> NO $#error $@ $2 $: $1 " not authenticated"
96a9758165cd Initial revision
carl
parents:
diff changeset
1647 R<$-:$+><VERIFY $*> <$*> NOT $#error $@ $2 $: $1 " no authentication requested"
96a9758165cd Initial revision
carl
parents:
diff changeset
1648 R<$-:$+><VERIFY $*> <$*> NONE $#error $@ $2 $: $1 " other side does not support STARTTLS"
96a9758165cd Initial revision
carl
parents:
diff changeset
1649 R<$-:$+><VERIFY $*> <$*> $+ $#error $@ $2 $: $1 " authentication failure " $4
96a9758165cd Initial revision
carl
parents:
diff changeset
1650 R<$*><REQ:$-> <$*> $: <$1> <REQ:$2> <$3> $>max $&{cipher_bits} : $&{auth_ssf}
96a9758165cd Initial revision
carl
parents:
diff changeset
1651 R<$*><REQ:$-> <$*> $- $: <$1> <$2:$4> <$3> $(arith l $@ $4 $@ $2 $)
96a9758165cd Initial revision
carl
parents:
diff changeset
1652 R<$-:$+><$-:$-> <$*> TRUE $#error $@ $2 $: $1 " encryption too weak " $4 " less than " $3
96a9758165cd Initial revision
carl
parents:
diff changeset
1653 R<$-:$+><$-:$-> <$*> $* $: <$1:$2 ++ $5>
96a9758165cd Initial revision
carl
parents:
diff changeset
1654 R<$-:$+ ++ > $@ OK
96a9758165cd Initial revision
carl
parents:
diff changeset
1655 R<$-:$+ ++ $+ > $: <$1:$2> <$3>
96a9758165cd Initial revision
carl
parents:
diff changeset
1656 R<$-:$+> < $+ ++ $+ > <$1:$2> <$3> <$4>
96a9758165cd Initial revision
carl
parents:
diff changeset
1657 R<$-:$+> $+ $@ $>"TLS_req" $3 $| <$1:$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1658
96a9758165cd Initial revision
carl
parents:
diff changeset
1659 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1660 ### TLS_req: check additional TLS requirements
96a9758165cd Initial revision
carl
parents:
diff changeset
1661 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1662 ### Parameters: [<list> <of> <req>] $| <$-:$+>
96a9758165cd Initial revision
carl
parents:
diff changeset
1663 ### $-: SMTP reply code
96a9758165cd Initial revision
carl
parents:
diff changeset
1664 ### $+: Enhanced Status Code
96a9758165cd Initial revision
carl
parents:
diff changeset
1665 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1666 STLS_req
96a9758165cd Initial revision
carl
parents:
diff changeset
1667 R $| $+ $@ OK
96a9758165cd Initial revision
carl
parents:
diff changeset
1668 R<CN> $* $| <$+> $: <CN:$&{TLS_Name}> $1 $| <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1669 R<CN:$&{cn_subject}> $* $| <$+> $@ $>"TLS_req" $1 $| <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1670 R<CN:$+> $* $| <$-:$+> $#error $@ $4 $: $3 " CN " $&{cn_subject} " does not match " $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1671 R<CS:$&{cert_subject}> $* $| <$+> $@ $>"TLS_req" $1 $| <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1672 R<CS:$+> $* $| <$-:$+> $#error $@ $4 $: $3 " Cert Subject " $&{cert_subject} " does not match " $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1673 R<CI:$&{cert_issuer}> $* $| <$+> $@ $>"TLS_req" $1 $| <$2>
96a9758165cd Initial revision
carl
parents:
diff changeset
1674 R<CI:$+> $* $| <$-:$+> $#error $@ $4 $: $3 " Cert Issuer " $&{cert_issuer} " does not match " $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1675 ROK $@ OK
96a9758165cd Initial revision
carl
parents:
diff changeset
1676
96a9758165cd Initial revision
carl
parents:
diff changeset
1677 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1678 ### max: return the maximum of two values separated by :
96a9758165cd Initial revision
carl
parents:
diff changeset
1679 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1680 ### Parameters: [$-]:[$-]
96a9758165cd Initial revision
carl
parents:
diff changeset
1681 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1682 Smax
96a9758165cd Initial revision
carl
parents:
diff changeset
1683 R: $: 0
96a9758165cd Initial revision
carl
parents:
diff changeset
1684 R:$- $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1685 R$-: $: $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1686 R$-:$- $: $(arith l $@ $1 $@ $2 $) : $1 : $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1687 RTRUE:$-:$- $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1688 R$-:$-:$- $: $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1689
96a9758165cd Initial revision
carl
parents:
diff changeset
1690
96a9758165cd Initial revision
carl
parents:
diff changeset
1691 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1692 ### RelayTLS: allow relaying based on TLS authentication
96a9758165cd Initial revision
carl
parents:
diff changeset
1693 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1694 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1695 ### none
96a9758165cd Initial revision
carl
parents:
diff changeset
1696 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1697 SRelayTLS
96a9758165cd Initial revision
carl
parents:
diff changeset
1698 # authenticated?
96a9758165cd Initial revision
carl
parents:
diff changeset
1699 R$* $: <?> $&{verify}
96a9758165cd Initial revision
carl
parents:
diff changeset
1700 R<?> OK $: OK authenticated: continue
96a9758165cd Initial revision
carl
parents:
diff changeset
1701 R<?> $* $@ NO not authenticated
96a9758165cd Initial revision
carl
parents:
diff changeset
1702 R$* $: $&{cert_issuer}
96a9758165cd Initial revision
carl
parents:
diff changeset
1703 R$+ $: $(access CERTISSUER:$1 $)
96a9758165cd Initial revision
carl
parents:
diff changeset
1704 RRELAY $# RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1705 RSUBJECT $: <@> $&{cert_subject}
96a9758165cd Initial revision
carl
parents:
diff changeset
1706 R<@> $+ $: <@> $(access CERTSUBJECT:$1 $)
96a9758165cd Initial revision
carl
parents:
diff changeset
1707 R<@> RELAY $# RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1708 R$* $: NO
96a9758165cd Initial revision
carl
parents:
diff changeset
1709
96a9758165cd Initial revision
carl
parents:
diff changeset
1710 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1711 ### authinfo: lookup authinfo in the access map
96a9758165cd Initial revision
carl
parents:
diff changeset
1712 ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1713 ### Parameters:
96a9758165cd Initial revision
carl
parents:
diff changeset
1714 ### $1: {server_name}
96a9758165cd Initial revision
carl
parents:
diff changeset
1715 ### $2: {server_addr}
96a9758165cd Initial revision
carl
parents:
diff changeset
1716 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1717 Sauthinfo
96a9758165cd Initial revision
carl
parents:
diff changeset
1718 R$* $: $1 $| $>D <$&{server_name}> <?> <! AuthInfo> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1719 R$* $| <?>$* $: $1 $| $>A <$&{server_addr}> <?> <! AuthInfo> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1720 R$* $| <?>$* $: $1 $| <$(access AuthInfo: $: ? $)> <>
96a9758165cd Initial revision
carl
parents:
diff changeset
1721 R$* $| <?>$* $@ no no authinfo available
96a9758165cd Initial revision
carl
parents:
diff changeset
1722 R$* $| <$*> <> $# $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1723
96a9758165cd Initial revision
carl
parents:
diff changeset
1724 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1725 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1726 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1727 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
1728 ##### MAIL FILTER DEFINITIONS
96a9758165cd Initial revision
carl
parents:
diff changeset
1729 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
1730 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1731 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1732
96a9758165cd Initial revision
carl
parents:
diff changeset
1733 Xdnsbl, S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=S:30s;R:30s;E:30s
96a9758165cd Initial revision
carl
parents:
diff changeset
1734 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1735 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1736 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1737 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
1738 ##### MAILER DEFINITIONS
96a9758165cd Initial revision
carl
parents:
diff changeset
1739 #####
96a9758165cd Initial revision
carl
parents:
diff changeset
1740 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1741 ######################################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1742
96a9758165cd Initial revision
carl
parents:
diff changeset
1743 #####################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1744 ### SMTP Mailer specification ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1745 #####################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1746
96a9758165cd Initial revision
carl
parents:
diff changeset
1747 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
1748
96a9758165cd Initial revision
carl
parents:
diff changeset
1749 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1750 # common sender and masquerading recipient rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1751 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1752 SMasqSMTP
96a9758165cd Initial revision
carl
parents:
diff changeset
1753 R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
96a9758165cd Initial revision
carl
parents:
diff changeset
1754 R$+ $@ $1 < @ *LOCAL* > add local qualification
96a9758165cd Initial revision
carl
parents:
diff changeset
1755
96a9758165cd Initial revision
carl
parents:
diff changeset
1756 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1757 # convert pseudo-domain addresses to real domain addresses
96a9758165cd Initial revision
carl
parents:
diff changeset
1758 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1759 SPseudoToReal
96a9758165cd Initial revision
carl
parents:
diff changeset
1760
96a9758165cd Initial revision
carl
parents:
diff changeset
1761 # pass <route-addr>s through
96a9758165cd Initial revision
carl
parents:
diff changeset
1762 R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
96a9758165cd Initial revision
carl
parents:
diff changeset
1763
96a9758165cd Initial revision
carl
parents:
diff changeset
1764 # output fake domains as user%fake@relay
96a9758165cd Initial revision
carl
parents:
diff changeset
1765
96a9758165cd Initial revision
carl
parents:
diff changeset
1766 # do UUCP heuristics; note that these are shared with UUCP mailers
96a9758165cd Initial revision
carl
parents:
diff changeset
1767 R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
96a9758165cd Initial revision
carl
parents:
diff changeset
1768 R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
96a9758165cd Initial revision
carl
parents:
diff changeset
1769
96a9758165cd Initial revision
carl
parents:
diff changeset
1770 # leave these in .UUCP form to avoid further tampering
96a9758165cd Initial revision
carl
parents:
diff changeset
1771 R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
96a9758165cd Initial revision
carl
parents:
diff changeset
1772 R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
96a9758165cd Initial revision
carl
parents:
diff changeset
1773 R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
96a9758165cd Initial revision
carl
parents:
diff changeset
1774 R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1775 R$+ < @ $~[ $* : $+ > $@ $1 < @ $4 > strip mailer: part
96a9758165cd Initial revision
carl
parents:
diff changeset
1776 R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
96a9758165cd Initial revision
carl
parents:
diff changeset
1777
96a9758165cd Initial revision
carl
parents:
diff changeset
1778
96a9758165cd Initial revision
carl
parents:
diff changeset
1779 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1780 # envelope sender rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1781 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1782 SEnvFromSMTP
96a9758165cd Initial revision
carl
parents:
diff changeset
1783 R$+ $: $>PseudoToReal $1 sender/recipient common
96a9758165cd Initial revision
carl
parents:
diff changeset
1784 R$* :; <@> $@ list:; special case
96a9758165cd Initial revision
carl
parents:
diff changeset
1785 R$* $: $>MasqSMTP $1 qualify unqual'ed names
96a9758165cd Initial revision
carl
parents:
diff changeset
1786 R$+ $: $>MasqEnv $1 do masquerading
96a9758165cd Initial revision
carl
parents:
diff changeset
1787
96a9758165cd Initial revision
carl
parents:
diff changeset
1788
96a9758165cd Initial revision
carl
parents:
diff changeset
1789 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1790 # envelope recipient rewriting --
96a9758165cd Initial revision
carl
parents:
diff changeset
1791 # also header recipient if not masquerading recipients
96a9758165cd Initial revision
carl
parents:
diff changeset
1792 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1793 SEnvToSMTP
96a9758165cd Initial revision
carl
parents:
diff changeset
1794 R$+ $: $>PseudoToReal $1 sender/recipient common
96a9758165cd Initial revision
carl
parents:
diff changeset
1795 R$+ $: $>MasqSMTP $1 qualify unqual'ed names
96a9758165cd Initial revision
carl
parents:
diff changeset
1796 R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1797
96a9758165cd Initial revision
carl
parents:
diff changeset
1798 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1799 # header sender and masquerading header recipient rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1800 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1801 SHdrFromSMTP
96a9758165cd Initial revision
carl
parents:
diff changeset
1802 R$+ $: $>PseudoToReal $1 sender/recipient common
96a9758165cd Initial revision
carl
parents:
diff changeset
1803 R:; <@> $@ list:; special case
96a9758165cd Initial revision
carl
parents:
diff changeset
1804
96a9758165cd Initial revision
carl
parents:
diff changeset
1805 # do special header rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1806 R$* <@> $* $@ $1 <@> $2 pass null host through
96a9758165cd Initial revision
carl
parents:
diff changeset
1807 R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
96a9758165cd Initial revision
carl
parents:
diff changeset
1808 R$* $: $>MasqSMTP $1 qualify unqual'ed names
96a9758165cd Initial revision
carl
parents:
diff changeset
1809 R$+ $: $>MasqHdr $1 do masquerading
96a9758165cd Initial revision
carl
parents:
diff changeset
1810
96a9758165cd Initial revision
carl
parents:
diff changeset
1811
96a9758165cd Initial revision
carl
parents:
diff changeset
1812 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1813 # relay mailer header masquerading recipient rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1814 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1815 SMasqRelay
96a9758165cd Initial revision
carl
parents:
diff changeset
1816 R$+ $: $>MasqSMTP $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1817 R$+ $: $>MasqHdr $1
96a9758165cd Initial revision
carl
parents:
diff changeset
1818
96a9758165cd Initial revision
carl
parents:
diff changeset
1819 Msmtp, P=[IPC], F=mDFMuX, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
96a9758165cd Initial revision
carl
parents:
diff changeset
1820 T=DNS/RFC822/SMTP,
96a9758165cd Initial revision
carl
parents:
diff changeset
1821 A=TCP $h
96a9758165cd Initial revision
carl
parents:
diff changeset
1822 Mesmtp, P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
96a9758165cd Initial revision
carl
parents:
diff changeset
1823 T=DNS/RFC822/SMTP,
96a9758165cd Initial revision
carl
parents:
diff changeset
1824 A=TCP $h
96a9758165cd Initial revision
carl
parents:
diff changeset
1825 Msmtp8, P=[IPC], F=mDFMuX8, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
96a9758165cd Initial revision
carl
parents:
diff changeset
1826 T=DNS/RFC822/SMTP,
96a9758165cd Initial revision
carl
parents:
diff changeset
1827 A=TCP $h
96a9758165cd Initial revision
carl
parents:
diff changeset
1828 Mdsmtp, P=[IPC], F=mDFMuXa%, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
96a9758165cd Initial revision
carl
parents:
diff changeset
1829 T=DNS/RFC822/SMTP,
96a9758165cd Initial revision
carl
parents:
diff changeset
1830 A=TCP $h
96a9758165cd Initial revision
carl
parents:
diff changeset
1831 Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=2040,
96a9758165cd Initial revision
carl
parents:
diff changeset
1832 T=DNS/RFC822/SMTP,
96a9758165cd Initial revision
carl
parents:
diff changeset
1833 A=TCP $h
96a9758165cd Initial revision
carl
parents:
diff changeset
1834
96a9758165cd Initial revision
carl
parents:
diff changeset
1835
96a9758165cd Initial revision
carl
parents:
diff changeset
1836 ######################*****##############
96a9758165cd Initial revision
carl
parents:
diff changeset
1837 ### PROCMAIL Mailer specification ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1838 ##################*****##################
96a9758165cd Initial revision
carl
parents:
diff changeset
1839
96a9758165cd Initial revision
carl
parents:
diff changeset
1840 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
1841
96a9758165cd Initial revision
carl
parents:
diff changeset
1842 Mprocmail, P=/usr/bin/procmail, F=DFMSPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP,
96a9758165cd Initial revision
carl
parents:
diff changeset
1843 T=DNS/RFC822/X-Unix,
96a9758165cd Initial revision
carl
parents:
diff changeset
1844 A=procmail -Y -m $h $f $u
96a9758165cd Initial revision
carl
parents:
diff changeset
1845
96a9758165cd Initial revision
carl
parents:
diff changeset
1846
96a9758165cd Initial revision
carl
parents:
diff changeset
1847 ##################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1848 ### Local and Program Mailer specification ###
96a9758165cd Initial revision
carl
parents:
diff changeset
1849 ##################################################
96a9758165cd Initial revision
carl
parents:
diff changeset
1850
96a9758165cd Initial revision
carl
parents:
diff changeset
1851 ##### $Id$ #####
96a9758165cd Initial revision
carl
parents:
diff changeset
1852
96a9758165cd Initial revision
carl
parents:
diff changeset
1853 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1854 # Envelope sender rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1855 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1856 SEnvFromL
96a9758165cd Initial revision
carl
parents:
diff changeset
1857 R<@> $n errors to mailer-daemon
96a9758165cd Initial revision
carl
parents:
diff changeset
1858 R@ <@ $*> $n temporarily bypass Sun bogosity
96a9758165cd Initial revision
carl
parents:
diff changeset
1859 R$+ $: $>AddDomain $1 add local domain if needed
96a9758165cd Initial revision
carl
parents:
diff changeset
1860 R$* $: $>MasqEnv $1 do masquerading
96a9758165cd Initial revision
carl
parents:
diff changeset
1861
96a9758165cd Initial revision
carl
parents:
diff changeset
1862 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1863 # Envelope recipient rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1864 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1865 SEnvToL
96a9758165cd Initial revision
carl
parents:
diff changeset
1866 R$+ < @ $* > $: $1 strip host part
96a9758165cd Initial revision
carl
parents:
diff changeset
1867 R$+ + $* $: < $&{addr_type} > $1 + $2 mark with addr type
96a9758165cd Initial revision
carl
parents:
diff changeset
1868 R<e s> $+ + $* $: $1 remove +detail for sender
96a9758165cd Initial revision
carl
parents:
diff changeset
1869 R< $* > $+ $: $2 else remove mark
96a9758165cd Initial revision
carl
parents:
diff changeset
1870
96a9758165cd Initial revision
carl
parents:
diff changeset
1871 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1872 # Header sender rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1873 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1874 SHdrFromL
96a9758165cd Initial revision
carl
parents:
diff changeset
1875 R<@> $n errors to mailer-daemon
96a9758165cd Initial revision
carl
parents:
diff changeset
1876 R@ <@ $*> $n temporarily bypass Sun bogosity
96a9758165cd Initial revision
carl
parents:
diff changeset
1877 R$+ $: $>AddDomain $1 add local domain if needed
96a9758165cd Initial revision
carl
parents:
diff changeset
1878 R$* $: $>MasqHdr $1 do masquerading
96a9758165cd Initial revision
carl
parents:
diff changeset
1879
96a9758165cd Initial revision
carl
parents:
diff changeset
1880 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1881 # Header recipient rewriting
96a9758165cd Initial revision
carl
parents:
diff changeset
1882 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1883 SHdrToL
96a9758165cd Initial revision
carl
parents:
diff changeset
1884 R$+ $: $>AddDomain $1 add local domain if needed
96a9758165cd Initial revision
carl
parents:
diff changeset
1885 R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
96a9758165cd Initial revision
carl
parents:
diff changeset
1886
96a9758165cd Initial revision
carl
parents:
diff changeset
1887 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1888 # Common code to add local domain name (only if always-add-domain)
96a9758165cd Initial revision
carl
parents:
diff changeset
1889 #
96a9758165cd Initial revision
carl
parents:
diff changeset
1890 SAddDomain
96a9758165cd Initial revision
carl
parents:
diff changeset
1891 R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
96a9758165cd Initial revision
carl
parents:
diff changeset
1892
96a9758165cd Initial revision
carl
parents:
diff changeset
1893 R$+ $@ $1 < @ *LOCAL* > add local qualification
96a9758165cd Initial revision
carl
parents:
diff changeset
1894
96a9758165cd Initial revision
carl
parents:
diff changeset
1895 Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
96a9758165cd Initial revision
carl
parents:
diff changeset
1896 T=DNS/RFC822/X-Unix,
96a9758165cd Initial revision
carl
parents:
diff changeset
1897 A=procmail -t -Y -a $h -d $u
96a9758165cd Initial revision
carl
parents:
diff changeset
1898 Mprog, P=/bin/sh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=$z:/,
96a9758165cd Initial revision
carl
parents:
diff changeset
1899 T=X-Unix/X-Unix/X-Unix,
96a9758165cd Initial revision
carl
parents:
diff changeset
1900 A=sh -c $u
96a9758165cd Initial revision
carl
parents:
diff changeset
1901