annotate test.cf @ 386:e27e22f6a49a

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