remove almost all filtering for popcon.d.o
[mirror/dsa-puppet.git] / modules / exim / templates / eximconf.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5
6 # This is the main exim4 configuration file based on the 28.08.05 version by
7 # ametzler
8
9 # The configuration file uses a set of rules to generate an
10 # acceptable mail environment for debian.org machines. It deviates
11 # considerably from what could be considered a standard exim configuration.
12
13 # This configuration file brings in the necessary information from
14 # other databases stored in /etc/exim/ and the files distributed by ud-ldap
15
16 # This file is independent of the local host, it should not be changed
17 # per machine. primary_hostname is used in all places that require per-host 
18 # settings.
19
20 # The configuration files in /etc/exim are as follows:
21 #  locals - This is a list of domains that are considered local. A local
22 #           domain is essential one that deliveries to /var/mail
23 #           will be attempted. The users available for local delivery
24 #           comes from /etc/passwd and /etc/aliases. Wildcards are not
25 #           permitted.
26 #  virtualdomains - This is a list of all virtual domains. A virtual domain
27 #           is much like a local domain, execpt that the delivery location
28 #           and allowed set of users is controlled by a virtual domain
29 #           alias file and not /etc/passwd. Wildcards are permitted
30 #  rcpthosts - recipient hosts or relay domains. This is a list of
31 #           all hosts that we mail exchange for. All domains that list
32 #           this host in their MX records should be listed here. Wildcards
33 #           are permitted.
34 #  relayhosts - Hostnames that can send any arbitarily addressed mail to
35 #           us. This is primarily only usefull for emergancy 'queue
36 #           flushing' operations, but should be populated with a list
37 #           of trusted machines. Wildcards are not permitted
38 #  bsmtp_domains - Domains that we deliver locally via bsmtp
39 <%=
40 out = ""
41 if nodeinfo['mailrelay']
42   out = '
43 #  mailhubdomains - Domains for which we are the MX, but the mail is relayed
44 #           elsewhere.  This is designed for use with small volume or
45 #           restricted machines that need to use a smarthost for mail
46 #           traffic.  We will relay for them based on ssl cert validation
47 #           but we need to teach exim how to route the mail to them.  This is
48 #           that list.
49 '
50 end
51 out
52 %>
53 # Exim's wildcard mechanism is a bit odd in that to say "any address in
54 # debian.org including debian.org" you must use two patterns,
55 #   *.debian.org
56 #   debian.org
57 # Also you can only place a * before a . and as the first char in a string.
58 # Wildcards always match last so they may be used as a catchall.
59
60 # Further details can be found in each of the files.
61
62 # Usefull exim commands:
63 #  exim4 -qf  - Try sending all messages right now, including frozen ones
64 #  exim4 -bt foo@blah - Write what exim would do if it saw the address
65 #                      Great for testing virtual domains and forward files
66
67 # Special Features for users:
68 # .forward-foo - is understood as an extension address for bar-foo@cow.com
69 # .forward-default - is understood to be a catch all for bar-*@cow.com
70 # .procmailrc - with no .forward file invokes procmail for delivery
71 #               automatically.
72
73 # For virtual domains the first lookup is done against a linear text
74 # database called 'aliases', then .forward files are consulted. Exim
75 # filtering is available for these .forward files only. .forward-default
76 # is the universal catch all for everything not handled.
77
78 # Heuristic check (none bad enough to cause a hard reject, but in aggregate
79 # will trigger things like rcpt to rate limiting or possibly a reject if
80 # enough hits are triggered.
81 #
82 # value is stored in acl_c_scr
83
84 ######################################################################
85 #                    MAIN CONFIGURATION SETTINGS                     #
86 ######################################################################
87
88 <%=
89 out=''
90 if nodeinfo.has_key?('heavy_exim') and not nodeinfo['heavy_exim'].empty?
91   out = "
92 perl_startup = do '/etc/exim4/exim_surbl.pl'
93 "
94 end
95 out
96 %>
97
98 # These options specify the Access Control Lists (ACLs) that
99 # are used for incoming SMTP messages - after the RCPT and DATA
100 # commands, respectively.
101
102 acl_smtp_helo = check_helo
103 acl_smtp_rcpt = ${if ={$interface_port}{587} {check_submission}{check_recipient}}
104 acl_smtp_data = check_message
105 <%=
106 out=''
107 if nodeinfo.has_key?('heavy_exim') and not nodeinfo['heavy_exim'].empty?
108   out = "acl_smtp_mime = acl_check_mime"
109 end
110 out
111 %>
112 acl_smtp_predata = acl_check_predata
113
114 # accept domain literal syntax in e-mail addresses. To actually make use of
115 # this a router is also required
116 allow_domain_literals = true
117
118 # This setting defines a named domain list called
119 # local_domains. It will be referenced
120 # later on by the syntax "+local_domains".
121 # Other domain and host lists may follow.
122 # @ is the local FQDN, @[] matches the IP adress of any local interface.
123
124 .include_if_exists /etc/exim4/local-settings.conf
125
126 domainlist local_domains = @ : \
127     @[] : \
128     localhost : \
129     ${if exists {/etc/exim4/locals}{lsearch;/etc/exim4/locals}}
130
131 domainlist virtual_domains = partial-lsearch;/etc/exim4/virtualdomains
132
133 domainlist submission_domains = ${if exists {/etc/exim4/submission-domains}{/etc/exim4/submission-domains}{}}
134
135 domainlist bsmtp_domains = ${if exists {/etc/exim4/bsmtp}{partial-lsearch;/etc/exim4/bsmtp}{}}
136
137 domainlist handled_domains = +local_domains : +virtual_domains : +bsmtp_domains
138
139 localpartlist local_only_users = lsearch;/etc/exim4/localusers
140
141 localpartlist postmasterish = postmaster : abuse : hostmaster : root
142
143 # Domains we relay for; that is domains that aren't considered local but we 
144 # accept mail for them.
145 domainlist rcpthosts = partial-lsearch;/etc/exim4/rcpthosts
146 hostlist debianhosts = 127.0.0.1 : net-lsearch;/var/lib/misc/thishost/debianhosts
147 <%=
148 out = ""
149 if nodeinfo['mailrelay']
150   out = '
151 domainlist mailhubdomains = lsearch;/etc/exim4/manualroute
152 '
153 end
154 out
155 %>
156
157 hostlist reservedaddrs = <%= nodeinfo['reservedaddrs'] %>
158
159 <%= out = ""
160 if has_variable?("exim_ssl_certs") && exim_ssl_certs == "true"
161 out = "tls_certificate = /etc/exim4/ssl/thishost.crt
162 tls_privatekey = /etc/exim4/ssl/thishost.key
163 tls_try_verify_hosts = *
164 tls_verify_certificates = /etc/exim4/ssl/ca.crt
165 tls_crl = /etc/exim4/ssl/ca.crl"
166 end
167 out
168 %>
169
170 # The setting below causes Exim to do a reverse DNS lookup on all incoming
171 # IP calls, in order to get the true host name. If you feel this is too
172 # expensive, you can specify the networks for which a lookup is done, or
173 # remove the setting entirely.
174 host_lookup = *
175 dns_ipv4_lookup = !localhost
176
177 # If this option is set, then any process that is running as one of the
178 # listed users may pass a message to Exim and specify the sender's
179 # address using the "-f" command line option, without Exim's adding a
180 # "Sender" header.
181
182 untrusted_set_sender = *
183
184 # Some operating systems use the "gecos" field in the system password file
185 # to hold other information in addition to users' real names. Exim looks up
186 # this field when it is creating "sender" and "from" headers. If these options
187 # are set, exim uses "gecos_pattern" to parse the gecos field, and then
188 # expands "gecos_name" as the user's name. $1 etc refer to sub-fields matched
189 # by the pattern.
190
191 gecos_pattern = ^([^,:]*)
192 gecos_name = $1
193
194 # This tells exim to immediately discard error messages (ie double bounces).
195 ignore_bounce_errors_after = 0s
196 auto_thaw = 1d
197 timeout_frozen_after=14d
198
199 message_size_limit = 100M
200 message_logs = false
201 smtp_accept_max_per_host = ${if match_ip {$sender_host_address}{+debianhosts}{0}{7}}
202 <% if nodeinfo.has_key?('heavy_exim') and not nodeinfo['heavy_exim'].empty? %>
203 smtp_accept_max = 300
204 smtp_accept_queue = 200
205 smtp_accept_queue_per_connection = 50
206 smtp_accept_reserve = 25
207 <% else %>
208 smtp_accept_max = 30
209 smtp_accept_queue = 20
210 smtp_accept_queue_per_connection = 10
211 smtp_accept_reserve = 5
212 <% end %>
213 smtp_reserve_hosts = +debianhosts
214
215 split_spool_directory = true
216 check_spool_inodes = 200
217 check_spool_space  = 20M
218
219 delay_warning =
220
221 <% if nodeinfo.has_key?('heavy_exim') and not nodeinfo['heavy_exim'].empty? %>
222 queue_run_max = 50
223 deliver_queue_load_max = 50
224 queue_only_load = 15
225 <% else %>
226 queue_run_max = 5
227 deliver_queue_load_max = 10
228 queue_only_load = 5
229 <% end %>
230 queue_list_requires_admin = false
231
232 <%= out  = ""
233 if has_variable?("clamd") && clamd == "true"
234   out = "av_scanner = clamd:/var/run/clamav/clamd.ctl"
235 end
236 out
237 %>
238
239 <%= 
240 ports = []
241 out = "daemon_smtp_ports = "
242 ports << 25
243
244 if nodeinfo['bugsmaster']
245   ports << 587
246 end
247
248 if not nodeinfo['mail_port'].to_s.empty?
249   ports << nodeinfo['mail_port']
250 end
251
252 if nodeinfo['mailrelay']
253   ports << nodeinfo['smarthost_port']
254 end
255
256 out += ports.uniq.sort.join(" : ")
257 out
258 %>
259
260 admin_groups = adm
261 remote_sort_domains = *.debian.org:*.debian.net
262
263 pipelining_advertise_hosts = !*
264 <%= out = ""
265 if has_variable?("exim_ssl_certs") && exim_ssl_certs == "true"
266 out = 'tls_advertise_hosts = *'
267 end
268 out
269 %>
270 smtp_enforce_sync = true
271
272 log_selector = +tls_cipher +tls_peerdn +queue_time +deliver_time +smtp_connection +smtp_incomplete_transaction +smtp_confirmation
273
274 received_header_text = Received: ${if def:sender_rcvhost {from $sender_rcvhost\n\t}\
275                                  {${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}\
276                                  ${if and {{eq {$tls_certificate_verified}{1}}{def:tls_peerdn}}{from $tls_peerdn (verified)\n\t}}\
277                                  by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher)\n\t}}\
278                                  (Exim $version_number)\n\t\
279                                  ${if def:sender_address {(envelope-from <$sender_address>)\n\t}}\
280                                  id $message_exim_id${if def:received_for {\n\tfor $received_for}}
281
282 # macro definitions.
283 # Do not wrap!
284 VDOMAINDATA = ${lookup{$domain}partial-lsearch{/etc/exim4/virtualdomains}{$value}}
285 WHITELIST = ${if match_domain{$domain}{+virtual_domains}{\
286                ${if exists {/srv/$domain/mail/whitelist}{\
287                 ${lookup{$local_part}lsearch{/srv/$domain/mail/whitelist}{$value}{}}\
288                 }{}}\
289                }{${lookup{$local_part}lsearch{/etc/exim4/whitelist}{$value}{}} : ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-whitelist}{$value}{}}}}
290 GREYLIST_LOCAL_PARTS = ${if match_domain{$domain}{+virtual_domains}\
291                        {${if exists {${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}\
292                        {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}{$local_part}{}}}{}}}\
293                        {${lookup{$local_part}lsearch{/etc/exim4/grey_users}{$local_part}{}} : \
294                        ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-greylist}{$local_part}{}}}}
295 RT_QUEUE_MAP = /srv/rt.debian.org/mail/rt_queue_map
296
297 ######################################################################
298 #                        ACL CONFIGURATION                           #
299 ######################################################################
300 begin acl
301
302 acl_getprofile:
303   # This is a bad hack to reset the variable, by defining it be something
304   # never referenced.
305
306   warn    set acl_m_rprf = $acl_m_undefined
307
308   warn    recipients     = survey@popcon.debian.org
309           set acl_m_rprf = PopconMail
310
311   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
312
313   warn    local_parts    = +local_only_users
314           domains        = +local_domains
315           hosts          = !+debianhosts
316           set acl_m_rprf = localonly
317
318   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
319
320 <%=
321 out=''
322 if nodeinfo['rtmaster']
323   out='
324   warn    domains        = rt.debian.org
325           set acl_m_rprf = RTMail
326
327   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
328 '
329 end
330 out
331 %>
332 <%=
333 out = ''
334 if nodeinfo['packagesmaster']
335   out = '
336   warn    domains        = packages.debian.org
337           set acl_m_rprf = PackagesMail
338
339   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
340 '
341 end
342 out
343 %>
344 <%=
345 out = ''
346 if nodeinfo['packagesqamaster']
347   out='
348   warn    recipients     = owner@packages.qa.debian.org : postmaster@packages.qa.debian.org
349           set acl_m_rprf = PTSOwner
350
351   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
352
353   warn    senders        = :
354           domains        = packages.qa.debian.org
355           condition      = ${if match{$local_part}{\N^bounces+\N}}
356           set acl_m_rprf = PTSListBounce
357
358   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
359
360   warn    domains        = packages.qa.debian.org
361           set acl_m_rprf = PTSMail
362
363   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
364 '
365 end
366 out
367 %>
368   warn    recipients     = change@db.debian.org : changes@db.debian.org : chpasswd@db.debian.org : ping@db.debian.org : recommend@nm.debian.org
369           set acl_m_rprf = DBSignedMail
370
371   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
372
373   warn    domains        = +virtual_domains
374           condition      = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction}}}}
375           condition      = ${if eq{${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction}}}{$value}{}}}{markup}}
376           log_message    = $local_part@$domain: markup
377           set acl_m_rprf = markup
378
379   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
380
381   warn    condition      = ${if eq{${lookup{$local_part}cdb{/var/lib/misc/${primary_hostname}/mail-contentinspectionaction.cdb}{$value}{}}}{markup}}
382           log_message    = $local_part@$domain: markup
383           set acl_m_rprf = markup
384
385   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
386
387   warn    condition      = ${if eq{${lookup{$local_part}cdb{/var/lib/misc/${primary_hostname}/mail-contentinspectionaction.cdb}{$value}{}}}{blackhole}}
388           log_message    = $local_part@$domain: blackhole
389           set acl_m_rprf = blackhole
390
391   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
392
393   warn    domains        = +virtual_domains
394           condition      = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction}}}}
395           condition      = ${if eq{${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/contentinspectionaction}}}{$value}{}}}{blackhole}}
396           log_message    = $local_part@$domain: blackhole
397           set acl_m_rprf = blackhole
398
399   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
400
401   warn    set acl_m_rprf = normal
402
403   accept
404
405 check_helo:
406
407   warn    set acl_c_scr    = 0
408
409 <%= 
410 out = ""
411 if nodeinfo['mailrelay']
412   out = "  accept  verify   = certificate"
413 end
414 out
415 %>
416
417   # These are in HELO acl so that they are only run once.  They increment a counter,
418   # so we don't want it to increment per rcpt to.
419
420   warn    dnslists       = list.dnswl.org&0.0.0.3
421           log_message    = Hit on list.dnswl.org for $sender_host_address
422           set acl_c_scr  = ${eval:$acl_c_scr-30}
423
424   warn    dnslists       = list.dnswl.org&0.0.0.2
425           log_message    = Hit on list.dnswl.org for $sender_host_address
426           set acl_c_scr  = ${eval:$acl_c_scr-20}
427
428   warn    dnslists       = list.dnswl.org
429           log_message    = Hit on list.dnswl.org for $sender_host_address
430           set acl_c_scr  = ${eval:$acl_c_scr-10}
431
432   warn    condition      = ${if isip {$sender_helo_name}{true}{false}}
433           log_message    = remote host used IP address in HELO/EHLO greeting
434           set acl_c_scr  = ${eval:$acl_c_scr+20}
435
436   warn    !hosts         = +debianhosts
437           condition      = ${if eq{$host_lookup_failed}{1}}
438           set acl_c_scr  = ${eval:$acl_c_scr+20}
439
440   warn    !hosts         = +debianhosts
441           condition      = ${if eq{$host_lookup_failed}{0}}
442           condition      = ${if match{$sender_host_name}{\N(^[^\.]*[0-9]\-+[0-9]|^[^\.]*[0-9]{5,}[^\.]|^([^\.]+\.)?[0-9][^ \.]*\.[^\.]+\..+\.[a-z]|^[^\.]*[0-9]\.[^\.]*[0-9]-[0-9]|^(dyn|cable|dhcp|dialup|ppp|adsl)[^\.]*[0-9])\N}}
443           set acl_c_scr  = ${eval:$acl_c_scr+20}
444
445   warn    !hosts         = +debianhosts
446           condition      = ${if match{$sender_helo_name}{\N(^[^\.]*[0-9]\-+[0-9]|^[^\.]*[0-9]{5,}[^\.]|^([^\.]+\.)?[0-9][^ \.]*\.[^\.]+\..+\.[a-z]|^[^\.]*[0-9]\.[^\.]*[0-9]-[0-9]|^(dyn|cable|dhcp|dialup|ppp|adsl)[^\.]*[0-9])\N}}
447           set acl_c_scr  = ${eval:$acl_c_scr+20}
448
449   warn    !hosts         = +debianhosts
450           dnslists       = dul.dnsbl.sorbs.net
451           set acl_c_scr  = ${eval:$acl_c_scr+15}
452
453   # If the sender's helo name is empty, the message will be rejected later
454   # because the helo is empty.  If the rDNS lookup failed, we are already
455   # going to greylist them, so no sense worrying about it here.  Finally,
456   # if rDNS does not match helo name (both lower cased first), greylist.
457
458   warn    !hosts         = +debianhosts
459           condition      = ${if eq {$host_lookup_failed}{1}{no}{yes}}
460           condition      = ${if def:sender_helo_name {yes}{no}}
461           condition      = ${if eq {${lc:$sender_helo_name}}{${lc:$sender_host_name}}{no}{yes}}
462           log_message    = HELO doesn't match rDNS
463           set acl_c_scr  = ${eval:$acl_c_scr+8}
464
465   # Regexes of doom
466   # matches 098325879 - looks fishy
467
468   warn condition        = ${if and { \
469                                      { !match{$sender_helo_name}{\N^\[.+\]$\N} } \
470                                      { !match{$sender_helo_name}{\N^(?i)((?=[^-])[a-z0-9-]*[a-z0-9]\.)+[a-z]{2,6}$\N} } \
471                                     } \
472                             }
473        log_message      = non-FQDN HELO
474        set acl_c_scr    = ${eval:$acl_c_scr+12}
475
476   # Matches DOMAIN99.com - looks bad
477
478   warn condition       = ${if match {$sender_helo_name}{\N^[A-Z]+[A-Z0-9\-]+\.[A-Za-z0-9]+$\N}}
479        log_message     = SHOUTING HELO
480        set acl_c_scr   = ${eval:$acl_c_scr+7}
481
482   # Random HELO (run of 7 consonants) (constructed by viruses).  We purposefully
483   # skip matching on machines named .*smtp.*, since that's 4 already.  This is a fairly
484   # naive test, so it's not worth much
485
486   warn condition       = ${if match {${lc:$sender_helo_name}}{smtp}{no}{yes}}
487        condition       = ${if match {${lc:$sender_helo_name}}{\N^[a-z0-9]+\.[a-z]+$\N}}
488        condition       = ${if match {${lc:$sender_helo_name}}{\N.*[bcdfghjklmnpqrstvwxz]{7,}.*\.[a-z]+$\N}}
489        log_message     = random HELO
490        set acl_c_scr   = ${eval:$acl_c_scr+5}
491
492   # Implicit, but simpler to just say it
493   accept
494
495 #!!# ACL that is used after the RCPT command on the submission port
496 check_submission:
497
498   # Accept if the source is local SMTP (i.e. not over TCP/IP).
499   # We do this by testing for an empty sending host field.
500   accept  hosts = : 127.0.0.1
501
502 <%= 
503 out = ""
504 if nodeinfo['mailrelay']
505   out = "  accept  verify   = certificate"
506 end
507 out
508 %>
509
510   # Defer after too many bad RCPT TO's.  Legit MTAs will retry later.
511   # This is a rough pass at preventing addres harvesting or other mail blasts.
512
513   defer  log_message   = Too many bad recipients ${eval:$rcpt_fail_count} out of $rcpt_count
514          message       = Too many bad recipients, try again later
515          condition     = ${if > {${eval:$rcpt_fail_count}}{3}{yes}{no}}
516
517   defer
518           ratelimit      = 5 / 60m / per_rcpt / $sender_host_address
519           !hosts         = +debianhosts
520           message        = sorry, only 5 reports per hour for submission
521
522   accept  domains  = +local_domains
523           hosts    = +debianhosts
524           endpass
525           message  = unknown user
526           verify   = recipient
527
528 <%=
529 out = ""
530 if nodeinfo['mailrelay']
531   out = '
532   accept  domains  = +mailhubdomains
533           endpass
534           message  = unknown user
535           verify   = recipient/callout=30s,defer_ok,use_sender,no_cache
536 '
537 end
538 out
539 %>
540
541   accept  domains  = +submission_domains
542           endpass
543           message  = unknown user
544           verify   = recipient
545
546   deny    message = relay not permitted
547
548 #!!# ACL that is used after the RCPT command
549 check_recipient:
550
551 <%=
552 out = ""
553 if nodeinfo['mailrelay']
554   out = "  accept  verify   = certificate"
555 end
556 out
557 %>
558
559   # Defer after too many bad RCPT TO's.  Legit MTAs will retry later.
560   # This is a rough pass at preventing addres harvesting or other mail blasts.
561
562   defer  log_message   = Too many bad recipients ${eval:$rcpt_fail_count} out of $rcpt_count
563          message       = Too many bad recipients, try again later
564          !hosts        = +debianhosts
565          condition     = ${if > {${eval:$rcpt_fail_count}}{3}{yes}{no}}
566
567   # Dump spambots that are so stupid they say helo as our IP address
568
569   drop !hosts          = +debianhosts
570        condition       = ${if eq {$sender_helo_name}{$interface_address}{yes}{no}}
571        message         = HELO mismatch Forged HELO for ($sender_helo_name)
572
573   # Also for spambots that say helo as us or one of our domains
574
575   drop !hosts          = +debianhosts
576        condition       = ${if match_domain{$sender_helo_name}{$primary_hostname:+handled_domains}}
577        condition       = ${if !match{$sender_host_name}{${rxquote:$sender_helo_name}\N$\N}}
578        message         = HELO mismatch Forged HELO for ($sender_helo_name)
579
580   # This logic gives you a list of commonly forged domains in helo to reject against
581
582   warn set acl_m_frg   = ${lookup{$sender_helo_name} \
583                            nwildlsearch{/etc/exim4/helo-check} \
584                           {${if eq{$value}{}{$sender_helo_name}{$value}}}{}}
585
586   # This is a failsafe in case DNS fails - we defer instead of hard reject if they 
587   # say helo as a name in the list but we can't look them up
588
589   defer !hosts         = +debianhosts
590         condition      = ${if eq{$acl_m_frg}{}{no}{yes}}
591         condition      = ${if eq{$sender_host_name}{}{yes}{no}}
592         condition      = ${if eq{$host_lookup_failed}{1}{no}{yes}}
593         message        = Access temporarily denied. Resolve failed PTR for $sender_host_address
594
595   # If DNS works, go ahead and reject them
596
597   drop  !hosts         = +debianhosts
598         condition      = ${if and { {!eq{$acl_m_frg}{}}{!match{$sender_host_name}{${rxquote:$acl_m_frg}\N$\N}}}{yes}{no}}
599         message        = HELO mismatch Forged HELO for ($sender_helo_name)
600
601   # disabled accounts don't even get local mail.
602   deny    local_parts   = lsearch;/var/lib/misc/$primary_hostname/mail-disable
603           domains       = +local_domains
604           message       = ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-disable}{$value}}
605
606   deny    domains       = +virtual_domains
607           local_parts   = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/localonly}}}\
608                                       {${extract{directory}{VDOMAINDATA}{${value}/localonly}}}\
609                                       {}}
610           hosts         = !+debianhosts
611           message       = mail for <$local_part@$domain> only accepted from debian.org machines
612   # Accept if the source is local SMTP (i.e. not over TCP/IP).
613   # We do this by testing for an empty sending host field.
614   accept  hosts = :
615   
616   deny    domains       = +handled_domains
617           local_parts   = ^[.] : ^.*[@%!/|]
618   
619   deny    domains       = !+handled_domains
620           local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
621
622 # forwards mail to @d.o address, even if it's a bounce from master, no reply
623 # from source address; rejecting all mail now.
624   deny    recipients    = mendoza@debian.org
625           hosts         = 65.110.39.147 : 64.39.31.15
626           message       = <mendoza@kenny.linuxsis.net> cannot forward here while mailer-daemon mail is not caught
627
628   deny    condition     = ${lookup{$sender_address_local_part}lsearch{/etc/exim4/localusers}{true}}
629           sender_domains= +local_domains : debian.org : debian.net : debian.com
630           hosts         = !+debianhosts
631           message       = mail from <$sender_address> not allowed externally
632
633   deny    condition     = ${if match_domain{$sender_address_domain}{+virtual_domains}{1}{0}}
634           condition     = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/neversenders}}}{1}{0}}
635           condition     = ${if match_local_part {$sender_address_local_part}{${extract{directory}{VDOMAINDATA}{${value}/neversenders}}}{1}{0}}
636           message       = no mail should ever come from <$sender_address>
637
638   warn    acl           = acl_getprofile
639           condition     = ${if eq{$acl_m_prf}{}}
640           set acl_m_prf = $acl_m_rprf
641
642   defer   condition     = ${if eq{$acl_m_prf}{$acl_m_rprf}{no}{yes}}
643           log_message   = Only one profile at a time, please
644
645   warn    condition     = ${if eq{$acl_m_prf}{localonly}}
646           set acl_m_lrc = ${if eq{$acl_m_lrc}{}{$local_part@$domain}{$acl_m_lrc, $local_part@$domain}}
647
648 <%=
649 out=''
650 if 0 == 1:
651 out='
652   deny    message  = address $sender_host_address is listed in $dnslist_domain; $dnslist_text
653           hosts    = !+debianhosts
654           dnslists = rbl.debian.net : rbl.debian.net/$sender_address_domain
655 '
656 end
657 out
658 %>
659 <%=
660 out=''
661 if nodeinfo['packagesmaster']
662   out='
663   warn    condition      = ${if eq {$acl_m_prf}{PackagesMail}}
664           condition      = ${if eq {$sender_address}{$local_part@$domain}}
665           message        = X-Packages-FromTo-Same: yes
666 '
667 end
668 out
669 %>
670   deny    condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
671           !verify        = sender
672
673   defer   !hosts         = +debianhosts
674           condition      = ${if >{${eval:$acl_c_scr+0}}{0}}
675           ratelimit      = 10 / 60m / per_rcpt / $sender_host_address
676           message        = slow down (no reverse dns, mismatched ehlo, dialup, or in blacklists)
677 <%=
678 out = ""
679 if has_variable?("policydweight") && policydweight == "true"
680 out = '
681   # Check with policyd-weight - this only works with a version after etch\'s,
682   # sadly.  etch\'s version attempts to hold the socket open, since that\'s what
683   # postfix expects.  Exim, on the other hand, expects the remote side to close
684   # the socket when it\'s finished sending data, so it see each transaction as
685   # an incomplete read.  I\'m sure there\'s a way we could force exim to do
686   # something sick and clever to force either the interpretation or the socket
687   # closure, but I\'m fairly sure it\'s now worth it, since the backport of
688   # policyd-weight is trivial.
689   warn  !hosts         = +debianhosts
690         condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
691         set acl_m_pw   = ${readsocket{inet:127.0.0.1:12525}\
692                           {request=smtpd_access_policy\n\
693                            protocol_state=RCPT\n\
694                            protocol_name=${uc:$received_protocol}\n\
695                            helo_name=$sender_helo_name\n\
696                            queue_id=$message_exim_id\n\
697                            sender=$sender_address\n\
698                            recipient=$local_part@$domain\n\
699                            recipient_count=$rcpt_count\n\
700                            client_address=$sender_host_address\n\
701                            client_name=$sender_host_name\n\
702                            reverse_client_name=$sender_host_name\n\
703                            instance=$sender_host_address.$sender_address.$sender_helo_name\n\n}\
704                           {20s}{\n}{socket failure}}
705
706   # Defer on socket error
707   defer !hosts         = +debianhosts
708         condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
709         condition      = ${if eq{$acl_m_pw}{socket failure}{yes}{no}}
710         message        = Cannot connect to policyd-weight. Please try again later.
711
712   # Set proposed action to $acl_m_act and message to $acl_m_mes
713   warn  !hosts         = +debianhosts
714         condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
715         set acl_m_mes  = ${extract{action}{$acl_m_pw}}
716         set acl_m_act  = ${sg{$acl_m_pw}{\Naction=[^ ]+ (.*)\n\n\N}{\$1}}
717
718   # Add X-policyd-weight header line to message
719   warn  !hosts         = +debianhosts
720         condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
721         message        = $acl_m_mes
722         condition      = ${if eq{$acl_m_act}{PREPEND}{yes}{no}}
723
724   # Write log message, if policyd-weight can\'t run checks
725   warn  !hosts         = +debianhosts
726         condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
727         log_message    = policyd-weight message: $acl_m_mes
728         condition      = ${if eq{$acl_m_act}{DUNNO}{yes}{no}}
729
730   # Deny mails which policyd-weight thinks are spam
731   deny  !hosts         = +debianhosts
732         condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
733         message        = policyd-weight said: $acl_m_mes
734         condition      = ${if eq{$acl_m_act}{550}{yes}{no}}
735
736   # Defer messages when policyd-weight suggests so.
737   defer  !hosts         = +debianhosts
738          condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
739          message        = policyd-weight said: $acl_m_mes
740          condition      = ${if eq{$acl_m_act}{450}{yes}{no}}
741 '
742 end
743 out
744 %>
745 <%=
746 out=''
747 if nodeinfo['rtmaster']
748   out='
749   warn    condition     = ${if eq{$acl_m_prf}{RTMail}}
750           set acl_m12   = ${if def:acl_m12 {$acl_m12} {${if or{{match{$local_part}{\N[^+]+\+\d+\N}}{match{$local_part}{\N[^+]+\+new\N}}} {RTMailRecipientHasSubaddress}}}}
751 '
752 end
753 out
754 %>
755 <%=
756 out = ""
757 if has_variable?("greylistd") && greylistd == "true"
758   out = '
759   defer
760     message  = $sender_host_address is not yet authorized to deliver mail from <$sender_address> to <$local_part@$domain>.
761     log_message = greylisted.
762     local_parts    = ${if match_domain{$domain}{+virtual_domains}\
763                      {${if exists {${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}\
764                      {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}{$local_part}{}}}{}}}\
765                      {${lookup{$local_part}lsearch{/etc/exim4/grey_users}{$local_part}{}} : \
766                      ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-greylist}{$local_part}{}}}}
767     !senders       = :
768     !hosts         = : +debianhosts : WHITELIST : \
769                      ${if exists {/etc/greylistd/whitelist-hosts}\
770                                  {/etc/greylistd/whitelist-hosts}{}} : \
771                      ${if exists {/var/lib/greylistd/whitelist-hosts}\
772                                  {/var/lib/greylistd/whitelist-hosts}{}} 
773     condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
774     !authenticated = *
775     domains        = +handled_domains : +rcpthosts
776     condition      = ${readsocket{/var/run/greylistd/socket}\
777                                  {--grey \
778                                   $sender_host_address \
779                                   $sender_address \
780                                   $local_part@$domain}\
781                                  {5s}{}{false}}
782 '
783 elsif has_variable?("postgrey") && postgrey == "true"
784   out = '
785   # next three are greylisting, inspired by http://www.bebt.de/blog/debian/archives/2006/07/30/T06_12_27/index.html
786   # this adds acl_m_grey if there isn\'t one (so unique per message)
787   warn
788     !senders       = :
789     !hosts         = : +debianhosts : WHITELIST
790     condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
791     condition      = ${if def:acl_m_grey {no}{yes}}
792     set acl_m_grey = $pid.$tod_epoch.$sender_host_port
793
794   # and defers the message if postgrey thinks it should be defered ...
795   defer
796     !senders       = :
797     !hosts         = : +debianhosts : WHITELIST
798     condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
799     !authenticated = *
800     domains        = +handled_domains : +rcpthosts
801     local_parts    = GREYLIST_LOCAL_PARTS
802     set acl_m_pgr  = request=smtpd_access_policy\n\
803                      protocol_state=RCPT\n\
804                      protocol_name=${uc:$received_protocol}\n\
805                      instance=${acl_m_grey}\n\
806                      helo_name=${sender_helo_name}\n\
807                      client_address=${substr_-3:${mask:$sender_host_address/24}}\n\
808                      client_name=${sender_host_name}\n\
809                      sender=${sender_address}\n\
810                      recipient=$local_part@$domain\n\n
811     set acl_m_pgr  = ${sg{\
812                          ${readsocket{/var/run/postgrey/socket}{$acl_m_pgr}\
813                                {5s}{}{action=DUNNO}}\
814                      }{action=}{}}
815     message        = ${sg{$acl_m_pgr}{^\\\\w+\\\\s*}{}}
816     log_message    = greylisted.
817     condition      = ${if eq{${uc:${substr{0}{5}{$acl_m_pgr}}}}{DEFER}}
818
819  # ... or adds a header with information about how long the delay was
820  warn
821     !senders       = :
822     !hosts         = : +debianhosts : WHITELIST
823     condition      = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
824     !authenticated = *
825     domains        = +handled_domains : +rcpthosts
826     local_parts    = GREYLIST_LOCAL_PARTS
827     condition      = ${if eq{${uc:${substr_0_7:$acl_m_pgr}}}{PREPEND}}
828     message        = ${sg{$acl_m_pgr}{^\\\\w+\\\\s*}{}}
829 '
830 end
831 out
832 %>
833
834   accept  local_parts   = +postmasterish
835           domains       = +handled_domains : +rcpthosts
836
837   deny    hosts        = ${if exists{/etc/exim4/host_blacklist}{/etc/exim4/host_blacklist}{}}
838           message      = I'm terribly sorry, but it seems you have been blacklisted
839           log_message  = blacklisted IP
840
841   deny   log_message   = <$sender_address> is blacklisted
842          senders       = ${if exists{/etc/exim4/blacklist}{/etc/exim4/blacklist}{}}
843          message       = We have blacklisted <$sender_address>.  Please stop mailing us
844
845   deny    message  = host $sender_host_address is listed in $dnslist_domain; see $dnslist_text
846           dnslists = ${if match_domain{$domain}{+virtual_domains}\
847                      {${if exists {${extract{directory}{VDOMAINDATA}{${value}/rbllist}}}\
848                      {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/rbllist}}}{$value}{}}}{}}}\
849                      {${lookup{$local_part}lsearch{/etc/exim4/rbllist}{$value}{}} : \
850                      ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-rbl}{$value}{}}}}
851           domains       = +handled_domains : +rcpthosts
852           !hosts        = +debianhosts : WHITELIST
853
854   deny    message  = domain $sender_address_domain is listed in $dnslist_domain; see $dnslist_text
855           dnslists = ${if match_domain{$domain}{+virtual_domains}\
856                      {${if exists {${extract{directory}{VDOMAINDATA}{${value}/rhsbllist}}}\
857                      {${expand:${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/rhsbllist}}}{$value}{}}}}{}}}\
858                      {${expand:${lookup{$local_part}lsearch{/etc/exim4/rhsbllist}{$value}{}}} : \
859                      ${expand:${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-rhsbl}{$value}{}}}}}
860           domains       = +handled_domains : +rcpthosts
861           !hosts        = +debianhosts : WHITELIST
862
863   deny    domains  = +handled_domains : +rcpthosts
864           local_parts   = ${if match_domain{$domain}{+virtual_domains}\
865                            {${if exists {${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}\
866                            {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}{$local_part}{}}}{}}}\
867                            {${lookup{$local_part}lsearch{/etc/exim4/callout_users}{$local_part}{}} : \
868                            ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-callout}{$local_part}{}}}}
869           !hosts   = +debianhosts : WHITELIST
870           !verify  = sender/callout
871
872 <%=
873 out = ""
874 if nodeinfo['mailrelay']
875   out = '
876   accept  domains  = +mailhubdomains
877           endpass
878           message  = unknown user
879           verify   = recipient/callout=30s,defer_ok,use_sender,no_cache
880 '
881 end
882 out
883 %>
884   accept  domains  = +handled_domains
885           endpass
886           message  = unknown user
887           verify   = recipient/defer_ok
888
889   accept  domains  = +rcpthosts
890           endpass
891           message  = unrouteable address
892           verify   = recipient
893
894   accept  hosts         = +debianhosts
895
896   accept  authenticated = *
897
898   deny    message = relay not permitted
899
900 <%=
901 out=''
902 if nodeinfo.has_key?('heavy_exim') and not nodeinfo['heavy_exim'].empty?
903 out='
904 acl_check_mime:
905
906  discard condition     = ${if <{$message_size}{256000}}
907          condition     = ${if eq {$acl_m_prf}{blackhole}}
908          set acl_m_srb = ${perl{surblspamcheck}}
909          condition     = ${if eq{$acl_m_srb}{false}{no}{yes}}
910          log_message   = discarded surbl message for $recipients
911
912   deny   condition     = ${if <{$message_size}{256000}}
913          condition     = ${if eq {$acl_m_prf}{markup}{no}{yes}}
914          condition     = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
915          set acl_m_srb = ${perl{surblspamcheck}}
916          condition     = ${if eq{$acl_m_srb}{false}{no}{yes}}
917          log_message   = $acl_m_srb
918          message       = $acl_m_srb
919
920   warn   condition     = ${if <{$message_size}{256000}}
921          condition     = ${if eq {$acl_m_prf}{markup}}
922          set acl_m_srb = ${perl{surblspamcheck}}
923          condition     = ${if eq{$acl_m_srb}{false}{no}{yes}}
924          message       = X-Surbl-Hit: $primary_hostname: $acl_m_srb
925
926   accept
927 '
928 end
929 out
930 %>
931
932 acl_check_predata:
933   deny   condition     = ${if eq{$acl_m_prf}{localonly}}
934          message       = mail for $acl_m_lrc is only accepted internally
935
936   accept
937
938
939 #!!# ACL that is used after the DATA command
940 check_message:
941 <%=
942 out=''
943 if nodeinfo['rtmaster']
944   out='
945   deny    condition = ${if eq {$acl_m_prf}{RTMail}}
946           condition = ${if and{{!match {${lc:$rh_Subject:}} {debian rt}} \
947                                {!match {${lc:$rh_Subject:]}} {\N\[rt.debian.org \N}} \
948                                {!match {$acl_m12}{RTMailRecipientHasSubaddress}}}}
949           message  = messages to the Request Tracker system require a subject tag or a subaddress
950 '
951 end
952 out
953 %>
954 <%=
955 out=''
956 if nodeinfo['packagesqamaster']
957   out='
958   deny    !hosts  = +debianhosts : 217.196.43.134
959           condition = ${if eq {$acl_m_prf}{PTSMail}}
960           condition = ${if def:h_X-PTS-Approved:{false}{true}}
961           message   = messages to the PTS require an X-PTS-Approved header
962 '
963 end
964 out
965 %>
966   deny    condition      = ${if eq {$acl_m_prf}{DBSignedMail}}
967           condition      = ${if and {{!match {$message_body}{PGP MESSAGE}}              \
968                                      {!match {$message_body}{PGP SIGNED MESSAGE}}       \
969                                      {!match {$message_body}{PGP SIGNATURE}}            \
970                                      {!match {$header_content-type:}{multipart/signed}} \
971                                      {!match {$header_content-type:}{pgp}}              \
972                                     }                                                   \
973                             }
974           message        = Mail to this address needs to be PGP-signed
975
976   accept verify  = certificate
977
978   require verify    = header_syntax
979           condition = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
980           message   = Invalid syntax in the header
981
982 # RFC 822 and 2822 say that headers must be ASCII.  This kinda emulates
983 # postfix's strict_7bit_headers option, but only checks a few common problem
984 # headers, as there doesn't appear to be an easy way to check them all.
985   deny
986           condition       = ${if or {{match {$rh_Subject:}{[\200-\377]}}\
987                                  {match {$rh_To:}{[\200-\377]}}\
988                                  {match {$rh_From:}{[\200-\377]}}\
989                                  {match {$rh_Cc:}{[\200-\377]}}}{true}{false}}
990           condition       = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
991           message         = improper use of 8-bit data in message header: message rejected
992
993   deny
994           condition       = ${if match {$rh_Subject:}{[^[:print:]]\{8\}}{true}{false}}
995           condition       = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
996           message         = Your mailer is not RFC 2047 compliant: message rejected
997
998 <%=
999 out = ""
1000 if has_variable?("clamd") && clamd == "true"
1001 out = '
1002   discard condition       = ${if eq {$acl_m_prf}{blackhole}}
1003           demime          = *
1004           malware         = */defer_ok
1005           log_message     = discarded malware message for $recipients
1006
1007   deny    condition       = ${if eq {$acl_m_prf}{markup}{no}{yes}}
1008           condition       = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
1009           demime          = *
1010           malware         = */defer_ok
1011           message         = malware detected: $malware_name: message rejected
1012
1013   warn    condition       = ${if eq {$acl_m_prf}{markup}}
1014           demime          = *
1015           malware         = */defer_ok
1016           message         = X-malware detected: $malware_name
1017 '
1018 end
1019 out
1020 %>
1021 <%=
1022 out=''
1023 if nodeinfo.has_key?('heavy_exim') and not nodeinfo['heavy_exim'].empty?
1024 out='
1025  discard condition     = ${if <{$message_size}{256000}}
1026          condition     = ${if eq {$acl_m_prf}{blackhole}}
1027          set acl_m_srb = ${perl{surblspamcheck}}
1028          condition     = ${if eq{$acl_m_srb}{false}{no}{yes}}
1029          log_message   = discarded surbl message for $recipients
1030
1031   deny   condition     = ${if <{$message_size}{256000}}
1032          condition     = ${if eq {$acl_m_prf}{markup}{no}{yes}}
1033          condition     = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
1034          set acl_m_srb = ${perl{surblspamcheck}}
1035          condition     = ${if eq{$acl_m_srb}{false}{no}{yes}}
1036          log_message   = $acl_m_srb
1037          message       = $acl_m_srb
1038
1039   warn   condition     = ${if <{$message_size}{256000}}
1040          condition     = ${if eq {$acl_m_prf}{markup}}
1041          set acl_m_srb = ${perl{surblspamcheck}}
1042          condition     = ${if eq{$acl_m_srb}{false}{no}{yes}}
1043          message       = X-Surbl-Hit: $primary_hostname: $acl_m_srb
1044
1045 '
1046 end
1047 out
1048 %>
1049   # Check header_sender except for survey@popcon.d.o
1050   deny    condition    = ${if eq{$acl_m_prf}{PopconMail}{false}{true}}
1051           !verify      = header_sender
1052           message      = No valid sender found in the From:, Sender: and Reply-to: headers
1053
1054 <%=
1055 out = ""
1056 if nodeinfo['packagesmaster']
1057   out = '
1058   deny  message        = Congratulations, you scored $spam_score points.
1059         log_message    = spam: $spam_score points.
1060         condition      = ${if eq {$acl_m_prf}{PackagesMail}}
1061         !authenticated = *
1062         !verify        = certificate
1063         !hosts         = +debianhosts
1064         condition      = ${if <{$message_size}{256000}}
1065         spam           = pkg_user : true
1066         condition      = ${if >{$spam_score_int}{59}}
1067 '
1068 end
1069 out
1070 %>
1071   accept
1072
1073
1074
1075 ######################################################################
1076 #                      REWRITE CONFIGURATION                         #
1077 ######################################################################
1078
1079
1080
1081 begin rewrite
1082
1083 \N^buildd_(.*)@ries\.debian\.org$\N buildd_$1@buildd.debian.org T
1084 \N^buildd_(.*)@klecker\.debian\.org$\N buildd_$1@buildd.debian.org T
1085 *@debian.org ${lookup{$1}cdb{/var/lib/misc/${primary_hostname}/mail-forward.cdb}{$value}fail} T
1086 *@people.debian.org ${lookup{$1}cdb{/var/lib/misc/${primary_hostname}/mail-forward.cdb}{$value}fail} T
1087 #*@${primary_hostname} "${if exists{/etc/exim4/email-addresses}{${lookup{$1}lsearch{/etc/exim4/email-addresses}{$value}fail}}fail}" fFs
1088 m68k@buildd.debian.org m68k-build@nocrew.org Ttrbc
1089
1090
1091 #!!#######################################################!!#
1092 #!!# Here follow routers created from the old routers,   #!!#
1093 #!!# for handling non-local domains.                     #!!#
1094 #!!#######################################################!!#
1095
1096 begin routers
1097
1098
1099
1100 ######################################################################
1101 #                      ROUTERS CONFIGURATION                         #
1102 #                Specifies how addresses are handled                 #
1103 ######################################################################
1104 #                          ORDER DOES MATTER                         #
1105 #     An address is passed to each in turn until it is accepted.     #
1106 ######################################################################
1107
1108 <%=
1109 out = ""
1110 if nodeinfo['mailrelay']
1111   out = '
1112 relay_manualroute:
1113   driver = manualroute
1114   domains = +mailhubdomains
1115   transport = remote_smtp
1116   route_data = ${lookup{$domain}lsearch{/etc/exim4/manualroute}}
1117   require_files = /etc/exim4/manualroute
1118 '
1119 end
1120 out
1121 %>
1122
1123 bsmtp:
1124   debug_print = "R: bsmtp for $local_part@$domain"
1125   driver = manualroute
1126   domains = +bsmtp_domains
1127   require_files = /etc/exim4/bsmtp
1128   route_list = * ${extract{file}{\
1129                    ${lookup{$domain}partial-lsearch{/etc/exim4/bsmtp}\
1130                      {$value}fail}}}
1131   transport = bsmtp
1132
1133 # This router routes to remote hosts over SMTP by explicit IP address,
1134 # given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
1135 # require this facility, which is why it is enabled by default in Exim.
1136 ipliteral:
1137   debug_print = "R: ipliteral for $local_part@$domain"
1138   driver = ipliteral
1139   domains = !+handled_domains
1140   transport = remote_smtp
1141   ignore_target_hosts = +reservedaddrs
1142
1143 <%=
1144 out = ""
1145 if not nodeinfo['smarthost'].empty?
1146 out = '
1147 smarthost:
1148   debug_print = "R: smarthost for $local_part@$domain"
1149   driver = manualroute
1150   domains = !+handled_domains
1151   transport = remote_smtp_smarthost
1152   route_list = * ' + nodeinfo['smarthost'] + '
1153   host_find_failed = defer
1154   same_domain_copy_routing = yes
1155   no_more
1156 '
1157 end
1158 out
1159 %>
1160
1161 # This router routes to remote hosts over SMTP using a DNS lookup.
1162 # Ignore reserved network responses, including localhost.
1163 dnslookup:
1164   debug_print = "R: dnslookup for $local_part@$domain"
1165   driver = dnslookup
1166   domains = !+handled_domains
1167   transport = remote_smtp
1168   ignore_target_hosts = +reservedaddrs
1169   no_more
1170
1171 postmasterish:
1172   debug_print = "R: postmasterish for $local_part@$domain"
1173   driver = redirect
1174   verify = false
1175   unseen = true
1176   expn = true
1177   local_parts = +postmasterish
1178   domains = +handled_domains
1179   data = debian-admin@debian.org
1180   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1181
1182 # This router handles aliasing using a traditional /etc/aliases file.
1183 # If any of your aliases expand to pipes or files, you will need to set
1184 # up a user and a group for these deliveries to run under. You can do
1185 # this by uncommenting the "user" option below (changing the user name
1186 # as appropriate) and adding a "group" option if necessary.
1187
1188 system_aliases:
1189   debug_print = "R: system_aliases for $local_part@$domain"
1190   driver = redirect
1191   allow_defer
1192   allow_fail
1193   data = ${lookup{$local_part}lsearch*{/etc/aliases}}
1194   domains = +local_domains
1195   file_transport = address_file
1196   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1197   pipe_transport = address_pipe
1198   retry_use_local_part
1199
1200 # This router handles forwarding using traditional .forward files.
1201 # It also allows mail filtering when a forward file starts with the 
1202 # string "# Exim filter": to disable filtering, uncomment the "filter" 
1203 # option. The check_ancestor option means that if the forward file 
1204 # generates an address that is an ancestor of the current one, the 
1205 # current one gets passed on instead. This covers the case where A is 
1206 # aliased to B and B has a .forward file pointing to A.
1207
1208 # For standard debian setup of one group per user, it is acceptable---normal
1209 # even---for .forward to be group writable. If you have everyone in one
1210 # group, you should comment out the "modemask" line. Without it, the exim
1211 # default of 022 will apply, which is probably what you want.
1212
1213 userforward_verify:
1214   debug_print = "R: userforward for $local_part${local_part_suffix}@$domain"
1215   driver = redirect
1216   check_ancestor
1217   user = Debian-exim
1218   no_check_local_user
1219   directory_transport = address_directory
1220   domains = +local_domains
1221   # filter - I have disabled filtering to force users to use .forward-foo files
1222   # or procmail. This will make it easier to move mailers in the future
1223   #
1224   # This bit does the qmailesque extension names, foo-bar@ is .forward-foo it
1225   # also checks if the .forward-bar exists, if not then it uses
1226   # .forward-default instead.
1227   file = $home/.forward\
1228          ${if eq{}{$local_part_suffix}{}{\
1229            ${if exists {${home}/.forward${local_part_suffix}} \
1230              {${local_part_suffix}}{-default}}\
1231            }\
1232           }
1233   file_transport = address_file
1234   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1235   local_part_suffix = -*
1236   local_part_suffix_optional
1237   modemask = 002
1238   pipe_transport = address_pipe
1239   reply_transport = address_reply
1240   require_files = $home
1241   router_home_directory = ${lookup passwd{$local_part}{${extract{5}{:}{$value}}}fail}
1242   verify_only
1243
1244 userforward:
1245   debug_print = "R: userforward for $local_part${local_part_suffix}@$domain"
1246   driver = redirect
1247   check_ancestor
1248   check_local_user
1249   directory_transport = address_directory
1250   domains = +local_domains
1251   # filter - I have disabled filtering to force users to use .forward-foo files
1252   # or procmail. This will make it easier to move mailers in the future
1253   #
1254   # This bit does the qmailesque extension names, foo-bar@ is .forward-foo it
1255   # also checks if the .forward-bar exists, if not then it uses
1256   # .forward-default instead.
1257   file = $home/.forward\
1258          ${if eq{}{$local_part_suffix}{}{\
1259            ${if exists {${home}/.forward${local_part_suffix}} \
1260              {${local_part_suffix}}{-default}}\
1261            }\
1262           }
1263   file_transport = address_file
1264   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1265   local_part_suffix = -*
1266   local_part_suffix_optional
1267   modemask = 002
1268   pipe_transport = address_pipe
1269   reply_transport = address_reply
1270   require_files = $home
1271   no_verify
1272
1273 # This delivers to procmail
1274 procmail:
1275   debug_print = "R: procmail for $local_part@$domain"
1276   driver = accept
1277   check_local_user
1278   domains = +local_domains
1279   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1280   no_verify
1281   no_expn
1282   require_files = $local_part:$home/.procmailrc
1283   transport = procmail_pipe
1284   transport_current_directory = $home
1285   
1286 # This driver delivers to the LDAP generated alias file.
1287 ldap_aliases:
1288   debug_print = "R: ldap_aliases for $local_part@$domain"
1289   driver = redirect
1290   allow_defer
1291   allow_fail
1292   data = ${if exists{/var/lib/misc/$primary_hostname/mail-forward.cdb}\
1293              {${lookup{$local_part}cdb\
1294                {/var/lib/misc/$primary_hostname/mail-forward.cdb}}}}
1295   domains = +local_domains
1296   file_transport = address_file
1297   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1298   pipe_transport = address_pipe
1299   retry_use_local_part
1300   
1301 # This director matches local user mailboxes.
1302 localuser:
1303   debug_print = "R: localuser for $local_part@$domain"
1304   driver = accept
1305   check_local_user
1306   domains = +local_domains
1307   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1308   # Disable if the user has never logged in
1309   require_files = $home
1310   transport = local_delivery
1311   no_more
1312
1313 # Now we begin the Virtual Domain configuration
1314 # Everything before here should apply only to the local domains with a 
1315 # domains= rule
1316
1317 # exim4 fails the router if it can't change to the user/group for delivery
1318 # during verification.  So we have to seperate the cases of verifying
1319 # the virts, and delivering to them.  blah.
1320 <%=
1321 out = ""
1322 if nodeinfo['packagesmaster']
1323   out = '
1324 # This router delivers for packages.d.o
1325 packages:
1326   debug_print = "R: packages for $local_part@$domain"
1327   driver = redirect
1328   file_transport = address_file
1329   pipe_transport = address_pipe
1330   domains = packages.debian.org
1331   require_files = /org/packages.debian.org/conf/maintainer
1332   data = ${lookup{$local_part}cdb{/org/packages.debian.org/conf/maintainer.cdb}}
1333   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1334   transport_home_directory = /org/packages.debian.org/mail
1335   transport_current_directory = /org/packages.debian.org/mail
1336   check_ancestor
1337   retry_use_local_part
1338   no_more
1339 '
1340 end
1341 out
1342 %>
1343
1344 <%=
1345 out = ""
1346 if nodeinfo['bugsmaster']
1347   out = '
1348 # This router delivers for bugs.d.o
1349 bugs:
1350   debug_print = "R: bugs for $local_part@$domain"
1351   driver = accept
1352   transport = bugs_pipe
1353   domains = bugs.debian.org
1354   cannot_route_message = Unknown or archived bug
1355   require_files = /org/bugs.debian.org/mail/run-procmail
1356   no_more
1357   local_parts = ${if match\
1358                   {$local_part}\
1359                   {\N^(\d+)(\d{2})(?:-(?:(?:submit|maintonly|quiet|forwarded|done|close|request|submitter)|(?:unsubscribe|ignore|(?:sub(?:scribe|help|yes|approve|reject))|unsubyes|bounce|probe|approve|reject|setlistyes|setlistsilentyes).*))?$\N}\
1360                {${if exists{/org/bugs.debian.org/spool/db-h/$2/$1$2.summary}\
1361                {$local_part}fail}}fail}
1362 '
1363 end
1364 out
1365 %>
1366
1367 <%=
1368 out = ""
1369 if nodeinfo['rtmaster']
1370   out = '
1371 # This router delivers for rt.d.o
1372 rt_force_new_verbose:
1373   debug_print = "R: rt for $local_part+new@$domain"
1374   driver = redirect
1375   domains = rt.debian.org
1376   require_files = /usr/bin/rt-mailgate : RT_QUEUE_MAP
1377   local_parts = ${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}{$local_part}{}}
1378   local_part_suffix = +new
1379   pipe_transport = rt_pipe
1380   data = "|/usr/bin/rt-mailgate --queue \'${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}}\' --url https://rt.debian.org/ --action ${if match{$local_part}{.*-comment.*}{comment}{correspond}}"
1381   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1382
1383 # FIXME: figure out how to generalize this approach so that all of the following would work
1384 # - rt+NNNN@rt.debian.org          : attach correspondence to ticket (verbose)
1385 # - rt+NNNN-quiesce@rt.debian.org  : attach correspondence to ticket (quiesce)
1386 # - rt+NNNN-<action>@rt.debian.org : attach correspondence to ticket (some action)
1387 # requires modification to custom condition in \'scrips\'
1388 rt_force_new_quiesce:
1389   debug_print = "R: rt for $local_part+new-quiesce@$domain"
1390   driver = redirect
1391   domains = rt.debian.org
1392   require_files = /usr/bin/rt-mailgate : RT_QUEUE_MAP
1393   local_parts = ${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}{$local_part}{}}
1394   local_part_suffix = +new-quiesce
1395   pipe_transport = rt_pipe
1396   data = "|/usr/bin/rt-mailgate --queue \'${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}}\' --url https://rt.debian.org/ --action ${if match{$local_part}{.*-comment.*}{comment}{correspond}}"
1397   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}\nX-RT-Mode: quiesce"
1398
1399 rt_otherwise:
1400   debug_print = "R: rt for $local_part@$domain"
1401   driver = redirect
1402   domains = rt.debian.org
1403   require_files = /usr/bin/rt-mailgate : RT_QUEUE_MAP
1404   local_parts = ${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}{$local_part}{}}
1405   local_part_suffix = +*
1406   local_part_suffix_optional
1407   pipe_transport = rt_pipe
1408   data = "|/usr/bin/rt-mailgate --queue \'${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}}\' --url https://rt.debian.org/ --extension ticket --action ${if match{$local_part}{.*-comment.*}{comment}{correspond}}"
1409   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1410 '
1411 end
1412 out
1413 %>
1414
1415 virt_alias_verify:
1416   debug_print = "R: virt_aliases for $local_part@$domain"
1417   driver = redirect
1418   data = ${if exists{\
1419            ${extract{directory}{VDOMAINDATA}{${value}/aliases}}}\
1420            {${lookup{$local_part}lsearch*{\
1421               ${extract{directory}{VDOMAINDATA}{$value/aliases}}\
1422            }}}}
1423   directory_transport = address_directory
1424   cannot_route_message = Unknown user
1425   domains = +virtual_domains
1426   file_transport = address_file
1427   pipe_transport = address_pipe
1428   qualify_preserve_domain
1429   retry_use_local_part
1430   transport_current_directory = ${extract{directory}{VDOMAINDATA}}
1431   transport_home_directory = ${extract{directory}{VDOMAINDATA}}
1432   verify_only
1433
1434 virt_direct_verify:
1435   debug_print = "R: virt_direct for $local_part@$domain"
1436   driver = redirect
1437   no_check_local_user
1438   user = Debian-exim
1439   allow_filter
1440   modemask = 002
1441   directory_transport = address_directory
1442   domains = +virtual_domains
1443   file = $home/.forward-\
1444               ${if exists {${home}/.forward-${local_part}}{${local_part}}\
1445                    {default}}
1446   file_transport = address_file
1447   pipe_transport = address_pipe
1448   reply_transport = address_reply
1449   retry_use_local_part
1450   router_home_directory = ${extract{directory}{VDOMAINDATA}}
1451   transport_current_directory = ${extract{directory}{VDOMAINDATA}}
1452   verify_only
1453
1454 # This is a senmailesque alias file lookup
1455 virt_aliases:
1456   debug_print = "R: virt_aliases for $local_part@$domain"
1457   driver = redirect
1458   allow_defer
1459   allow_fail
1460   data = ${if exists{\
1461            ${extract{directory}{VDOMAINDATA}{${value}/aliases}}}\
1462            {${lookup{$local_part}lsearch*{\
1463               ${extract{directory}{VDOMAINDATA}{$value/aliases}}\
1464            }}}}
1465   directory_transport = address_directory
1466   domains = +virtual_domains
1467   file_transport = ${if eq {${extract{group_writable}{VDOMAINDATA}}}{true}{address_file_group}{address_file}}
1468   cannot_route_message = Unknown user
1469   group = ${extract{group}{VDOMAINDATA}}
1470   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1471   pipe_transport = address_pipe
1472   qualify_preserve_domain
1473   retry_use_local_part
1474   transport_current_directory = ${extract{directory}{VDOMAINDATA}}
1475   transport_home_directory = ${extract{directory}{VDOMAINDATA}}
1476   no_verify
1477   user = ${extract{user}{VDOMAINDATA}}
1478   
1479 # This is a qmailesque deliver into a directory of .forward files
1480 virt_direct:
1481   debug_print = "R: virt_direct for $local_part@$domain"
1482   driver = redirect
1483   allow_filter
1484   allow_fail
1485   allow_defer
1486   no_check_local_user
1487   directory_transport = address_directory
1488   domains = +virtual_domains
1489   file = $home/.forward-\
1490               ${if exists {${home}/.forward-${local_part}}{${local_part}}\
1491                    {default}}
1492   file_transport = ${if eq {${extract{group_writable}{VDOMAINDATA}}}{true}{address_file_group}{address_file}}
1493   group = ${extract{group}{VDOMAINDATA}}
1494   headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1495   modemask = 002
1496   pipe_transport = address_pipe
1497   reply_transport = address_reply
1498   retry_use_local_part
1499   router_home_directory = ${extract{directory}{VDOMAINDATA}}
1500   transport_current_directory = ${extract{directory}{VDOMAINDATA}}
1501   no_verify
1502   user = ${extract{user}{VDOMAINDATA}}
1503   #debug_print = .forward-${if exists {${home}/.forward-${local_part}} {${local_part}} {default}}
1504
1505 ######################################################################
1506 #                      TRANSPORTS CONFIGURATION                      #
1507 ######################################################################
1508 #                       ORDER DOES NOT MATTER                        #
1509 #     Only one appropriate transport is called for each delivery.    #
1510 ######################################################################
1511
1512
1513 begin transports
1514
1515 # This transport is used for local delivery to user mailboxes. On debian
1516 # systems group mail is used so we can write to the /var/mail
1517 # directory. (The alternative, which most other unixes use, is to deliver
1518 # as the user's own group, into a sticky-bitted directory)
1519 local_delivery:
1520   driver = appendfile
1521   file = /var/mail/${local_part}
1522   group = mail
1523   mode = 0660
1524   no_mode_fail_narrower
1525   return_path_add
1526   
1527 # This transport is used for handling pipe addresses generated by alias
1528 # or .forward files. It has a conventional name, since it is not actually
1529 # mentioned elsewhere in this configuration file. (A different name *can*
1530 # be specified via the "address_pipe_transport" option if you really want
1531 # to.) If the pipe generates any standard output, it is returned to the sender
1532 # of the message as a delivery error. Set return_fail_output instead if you
1533 # want this to happen only when the pipe fails to complete normally.
1534
1535 address_pipe:
1536   driver = pipe
1537   current_directory = ${home}
1538   environment = "EXTENSION=${substr_1:${local_part_suffix}}:\
1539                  EXT=${substr_1:${local_part_suffix}}:\
1540                  LOCAL=${local_part}${local_part_suffix}:\
1541                  RECIPIENT=${local_part}${local_part_suffix}@${domain}"
1542   return_output
1543   return_path_add
1544
1545 # This transport is used for handling file addresses generated by alias
1546 # or .forward files. It has a conventional name, since it is not actually
1547 # mentioned elsewhere in this configuration file.
1548
1549 address_file:
1550   driver = appendfile
1551   return_path_add
1552
1553 address_file_group:
1554   driver = appendfile
1555   return_path_add
1556   mode = 0660
1557   directory_mode = 0770
1558   mode_fail_narrower = false
1559
1560 # This transport is used for handling file addresses generated by alias
1561 # or .forward files if the path ends in "/", which causes it to be treated
1562 # as a directory name rather than a file name. Each message is then delivered
1563 # to a unique file in the directory. If instead you want all such deliveries to
1564 # be in the "maildir" format that is used by some other mail software,
1565 # uncomment the final option below. If this is done, the directory specified
1566 # in the .forward or alias file is the base maildir directory.
1567 #
1568 # Should you want to be able to specify either maildir or non-maildir
1569 # directory-style deliveries, then you must set up yet another transport,
1570 # called address_directory2. This is used if the path ends in "//" so should
1571 # be the one used for maildir, as the double slash suggests another level
1572 # of directory. In the absence of address_directory2, paths ending in //
1573 # are passed to address_directory.
1574
1575 address_directory:
1576   driver = appendfile
1577   check_string = 
1578   maildir_format
1579   message_prefix = ""
1580   message_suffix = ""
1581   return_path_add
1582
1583 # This transport is used for handling autoreplies generated by the filtering
1584 # option of the forwardfile director. It has a conventional name, since it
1585 # is not actually mentioned elsewhere in this configuration file.
1586 address_reply:
1587   driver = autoreply
1588
1589 # This transport is used for delivering messages over SMTP connections.
1590
1591 remote_smtp:
1592   driver = smtp
1593   connect_timeout = 1m
1594   delay_after_cutoff = false
1595 <%=
1596 out = ""
1597 if has_variable?("exim_ssl_certs") && exim_ssl_certs == "true"
1598   out = "  tls_certificate = /etc/exim4/ssl/thishost.crt
1599   tls_privatekey = /etc/exim4/ssl/thishost.key"
1600 end
1601 out
1602 %>
1603
1604 <%=
1605 out = ""
1606 if not nodeinfo['smarthost'].empty?
1607 out = '
1608 remote_smtp_smarthost:
1609   debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
1610   driver = smtp
1611   delay_after_cutoff = false
1612   port = '
1613   out += nodeinfo['smarthost_port'].to_s + "\n"
1614   if has_variable?("exim_ssl_certs") && exim_ssl_certs == "true"
1615     out += '  tls_tempfail_tryclear = false
1616   hosts_require_tls = ' + nodeinfo['smarthost'] + '
1617   tls_certificate = /etc/exim4/ssl/thishost.crt
1618   tls_privatekey = /etc/exim4/ssl/thishost.key
1619 '
1620   end
1621 end
1622 out
1623 %>
1624
1625 # Send the message to procmail
1626 procmail_pipe:
1627   driver = pipe
1628   command = /usr/bin/procmail -a ${substr_1:${local_part_suffix}}}
1629   return_path_add
1630   user = ${local_part}
1631
1632 bsmtp:
1633   driver = appendfile
1634   batch_max = 100
1635   file = ${host}
1636   message_prefix = 
1637   message_suffix = 
1638   use_bsmtp
1639   user = ${extract{user}{\
1640                    ${lookup{$domain}partial-lsearch{/etc/exim4/bsmtp}\
1641                      {$value}fail}\
1642                    }}
1643
1644 <%=
1645 out = ""
1646 if nodeinfo['bugsmaster']
1647   out = '
1648 bugs_pipe:
1649   driver = pipe
1650   command = /org/bugs.debian.org/mail/run-procmail
1651   environment = "EXTENSION=${substr_1:${local_part_suffix}}:\
1652                  EXT=${substr_1:${local_part_suffix}}:\
1653                  LOCAL=${local_part}${local_part_suffix}:\
1654                  RECIPIENT=${local_part}${local_part_suffix}@${domain}"
1655   return_path_add
1656   return_output
1657   user = debbugs
1658 '
1659 end
1660 out
1661 %>
1662
1663 <%=
1664 out = ""
1665 if nodeinfo['rtmaster']
1666   out = '
1667 rt_pipe:
1668   debug_print = "T: rt_pipe for $local_part${local_part_suffix}@$domain"
1669   driver = pipe
1670   return_fail_output
1671   environment = EXTENSION=${substr_1:${local_part_suffix}}
1672   allow_commands = /usr/bin/rt-mailgate
1673 '
1674 end
1675 out
1676 %>
1677
1678 ######################################################################
1679 #                      RETRY CONFIGURATION                           #
1680 ######################################################################
1681
1682 # This single retry rule applies to all domains and all errors. It specifies
1683 # retries every 15 minutes for 2 hours, then increasing retry intervals,
1684 # starting at 2 hours and increasing each time by a factor of 1.5, up to 16
1685 # hours, then retries every 8 hours until 4 days have passed since the first
1686 # failed delivery.
1687
1688 # Domain               Error       Retries
1689 # ------               -----       -------
1690
1691
1692 begin retry
1693
1694 debian.org             *           F,2h,10m; G,16h,2h,1.5; F,14d,8h
1695 *                      rcpt_4xx    F,2h,5m;  F,4h,10m; F,4d,15m
1696 *                      *           F,2h,15m; G,16h,2h,1.5; F,4d,8h
1697
1698 # End of Exim 4 configuration