102 |
104 |
103 - leere Felder am Ende werden „gestrippt“ |
105 - leere Felder am Ende werden „gestrippt“ |
104 - Whitespace der Felder wird gestrippt |
106 - Whitespace der Felder wird gestrippt |
105 - leeres Feld in der Mitte: a: :b |
107 - leeres Feld in der Mitte: a: :b |
106 - leeres Felder am Anfang bleibt |
108 - leeres Felder am Anfang bleibt |
107 |
109 - "Escapen" des Listentrenners durch Verdoppeln |
108 > exim -be '${map{<, ,a,b,,, ,c,}{<$item>}}' |
110 |
|
111 a : b::c : d -> (a) (b:c) (d) |
|
112 |
|
113 > exim -be '${map{:a:b:c,}{<$item>}}' |
|
114 > exim -be '${map{<,,a,b,c,}{<$item>}}' |
|
115 |
|
116 > exim -C <(echo domainlist local_domains = 'a:b::c:d') -be '${listnamed:local_domains}' |
|
117 |
109 |
118 |
110 ### Regexp |
119 ### Regexp |
111 Format ^… |
120 Format ^… |
112 |
121 |
113 Beginnt mit ^, damit es sich von einem normalen String unterscheidet! |
122 Beginnt mit ^, damit es sich von einem normalen String unterscheidet! |
181 |
190 |
182 Typen: domainlist, hostlist, addresslist, localpartlist |
191 Typen: domainlist, hostlist, addresslist, localpartlist |
183 Caching nur wenn die RHS keine '$' enthält, also konstante Ergebnisse zu erwarten sind. |
192 Caching nur wenn die RHS keine '$' enthält, also konstante Ergebnisse zu erwarten sind. |
184 |
193 |
185 Jeder Listtyp hat seine Eigenarten. |
194 Jeder Listtyp hat seine Eigenarten. |
|
195 |
|
196 > exim -bP +<name> |
186 |
197 |
187 ### domainlist |
198 ### domainlist |
188 |
199 |
189 domainlist - @, @mx_primary, @mx_secondary, @mx_any, <pattern>, lookup, literal |
200 domainlist - @, @mx_primary, @mx_secondary, @mx_any, <pattern>, lookup, literal |
190 hostlist - Namen, Adressen spec(10.11 ff) |
201 hostlist - Namen, Adressen spec(10.11 ff) |
273 - decline -> nächster Router (or fail, wenn no_more) |
284 - decline -> nächster Router (or fail, wenn no_more) |
274 - fail -> DONE (bounce) |
285 - fail -> DONE (bounce) |
275 - defer -> Semi-DONE (re-queue) |
286 - defer -> Semi-DONE (re-queue) |
276 - error -> wie defer |
287 - error -> wie defer |
277 |
288 |
|
289 # Hint-Databases |
|
290 |
|
291 liegen in $spool_directory/db |
|
292 - retry |
|
293 - wait-<transport> |
|
294 - callout |
|
295 - ratelimit |
|
296 - misc |
|
297 |
|
298 Sind verzichtbar! |
|
299 |
|
300 ## Wartung |
|
301 |
|
302 ### Ansehen |
|
303 |
|
304 > exim_dumpdb <spool_dir> <db> |
|
305 eg: exim_dumpdb /var/spool/exim4 |
|
306 |
|
307 Je nach DB unterschiedliches Format |
|
308 |
|
309 ### Verändern |
|
310 |
|
311 Aufräumen |
|
312 > exim_tidyb <spool_dir> <db> (Cronjob) |
|
313 |
|
314 Reparieren |
|
315 > exim_fixdb <spool_dir> <db> |
|
316 |
|
317 … that's it … |
|
318 |
|
319 # Acess Control Lists |
|
320 |
|
321 acl_not_smtp ACL for non-SMTP messages |
|
322 acl_not_smtp_mime ACL for non-SMTP MIME parts |
|
323 acl_not_smtp_start ACL at start of non-SMTP message |
|
324 acl_smtp_auth ACL for AUTH |
|
325 acl_smtp_connect ACL for start of SMTP connection |
|
326 acl_smtp_data ACL after DATA is complete |
|
327 acl_smtp_data_prdr ACL for each recipient, after DATA is complete |
|
328 acl_smtp_etrn ACL for ETRN |
|
329 acl_smtp_expn ACL for EXPN |
|
330 acl_smtp_helo ACL for HELO or EHLO |
|
331 acl_smtp_mail ACL for MAIL |
|
332 acl_smtp_mailauth ACL for the AUTH parameter of MAIL |
|
333 acl_smtp_mime ACL for content-scanning MIME parts |
|
334 acl_smtp_notquit ACL for non-QUIT terminations |
|
335 acl_smtp_predata ACL at start of DATA command |
|
336 acl_smtp_quit ACL for QUIT |
|
337 acl_smtp_rcpt ACL for RCPT |
|
338 acl_smtp_starttls ACL for STARTTLS |
|
339 acl_smtp_vrfy ACL for VRFY |
|
340 |
|
341 acl_<hook> = <aclverb> | <filename> | <acl-name> |
|
342 eg: acl_smtp_rcpt = acl_check_rcpt |
|
343 |
|
344 ## Policies |
|
345 |
|
346 ### acl_smtp_rcpt |
|
347 |
|
348 Abweisung einzelner Empfänger, noch kein Content! |
|
349 |
|
350 ### acl_smtp_data |
|
351 |
|
352 Content-Scan. Nicht mehr für einzelne Empfänger, |
|
353 $local_part, $domain steht nicht mehr zur Verfügung, |
|
354 aber $recpients, $rcpt_count, … |
|
355 |
|
356 ## Return-Values |
|
357 |
|
358 - accept |
|
359 - defer |
|
360 - deny |
|
361 - discard |
|
362 |
|
363 default: "accept", ausser bei acl_smtp_rcpt, dort ist es "deny" |
|
364 implizit "deny" am Ende jeder ACL! |
|
365 |
|
366 |
|
367 ## Test |
|
368 |
|
369 > exim -bh <ip> |
|
370 > swaks --pipe 'exim -bh <ip> -C <config>' -f <sender> -t <rcpt> |
|
371 |
|
372 exim -N hilft nicht, ist aber nicht für die SMTP acl |
|
373 relevant! |
|
374 |
|
375 ## Format |
|
376 |
|
377 <aclverb> [<condition>] |
|
378 … |
|
379 [<modifier] |
|
380 |
|
381 Bedingungen müssen erfüllt sein, Order matters, Abbruch |
|
382 bei nicht erfüllter Bedingung! Modifier sind immer "true" |
|
383 |
|
384 ### Verb |
|
385 |
|
386 accept, defer, deny, discard, drop, require, warn |
|
387 |
|
388 ### Modifier |
|
389 |
|
390 message = [code] text |
|
391 log_message = text |
|
392 |
|
393 Immediate: |
|
394 logwrite = text |
|
395 control = … |
|
396 set = … |
|
397 add_header = … |
|
398 remove_header = … |
|
399 |
|
400 ### Conditions |
|
401 |
|
402 <condition> = <value> |
|
403 |
|
404 eg: deny hosts = !192.168.3.8 # neg. Liste |
|
405 deny !hosts = 192.168.3.8 # neg. Resultat |
|
406 |
|
407 vs: deny !verify = recipient # works |
|
408 deny verify = !recipient # FALSCH |
|
409 |
|
410 |
|
411 Wert der Condition und von Modifiern wird expandiert. |
|
412 Force Failure bedeutet: Condition war nicht anwesend! |
|
413 |
|
414 Reihenfolge ist wichtig! Short Circuit. |
|
415 Position der Modifier ist wichtig! |
|
416 |
|
417 |
|
418 |
278 # DNS Lookups |
419 # DNS Lookups |
279 |
420 |
280 ## DNSSEC |
421 ## DNSSEC |
281 dns_dnssec_ok = 1 |
422 dns_dnssec_ok = 1 |
282 |
423 |
293 - Option /^.<option> eg: |exim_user| |
434 - Option /^.<option> eg: |exim_user| |
294 - Variable /^\$[^{] eg: $localhost_number |
435 - Variable /^\$[^{] eg: $localhost_number |
295 - Operators: /^\$\{<operator> eg: ${hash:<string>} … |
436 - Operators: /^\$\{<operator> eg: ${hash:<string>} … |
296 - Condition: /^<condition> \{ eg: eq {<string1>}{<string2>} … |
437 - Condition: /^<condition> \{ eg: eq {<string1>}{<string2>} … |
297 - Functions: /^\$\{ eg: ${map{<string1>}{<string2>}} … |
438 - Functions: /^\$\{ eg: ${map{<string1>}{<string2>}} … |
|
439 - ACL conditions /^[a-z] |
298 |
440 |
299 ## Liste globaler Optionen {{{ |
441 ## Liste globaler Optionen {{{ |
300 |
442 |
301 accept_8bitmime |
443 accept_8bitmime |
302 acl_not_smtp |
444 acl_not_smtp |