annotate test.cf @ 13:75e1a9bcbc2e

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