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
6 # This is the main exim4 configuration file based on the 28.08.05 version by
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.
13 # This configuration file brings in the necessary information from
14 # other databases stored in /etc/exim/ and the files distributed by ud-ldap
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
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
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
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 # mailhubdomains - Domains for which we are the MX, but the mail is relayed
39 # elsewhere. This is designed for use with small volume or
40 # restricted machines that need to use a smarthost for mail
41 # traffic. We will relay for them based on ssl cert validation
42 # but we need to teach exim how to route the mail to them. This is
45 # Exim's wildcard mechanism is a bit odd in that to say "any address in
46 # debian.org including debian.org" you must use two patterns,
49 # Also you can only place a * before a . and as the first char in a string.
50 # Wildcards always match last so they may be used as a catchall.
52 # Further details can be found in each of the files.
54 # Usefull exim commands:
55 # exim4 -qf - Try sending all messages right now, including frozen ones
56 # exim4 -bt foo@blah - Write what exim would do if it saw the address
57 # Great for testing virtual domains and forward files
59 # Special Features for users:
60 # .forward-foo - is understood as an extension address for bar-foo@cow.com
61 # .forward-default - is understood to be a catch all for bar-*@cow.com
62 # .procmailrc - with no .forward file invokes procmail for delivery
65 # For virtual domains the first lookup is done against a linear text
66 # database called 'aliases', then .forward files are consulted. Exim
67 # filtering is available for these .forward files only. .forward-default
68 # is the universal catch all for everything not handled.
70 # Heuristic check (none bad enough to cause a hard reject, but in aggregate
71 # will trigger things like rcpt to rate limiting or possibly a reject if
72 # enough hits are triggered.
74 # value is stored in acl_c1
76 ######################################################################
77 # MAIN CONFIGURATION SETTINGS #
78 ######################################################################
80 # These options specify the Access Control Lists (ACLs) that
81 # are used for incoming SMTP messages - after the RCPT and DATA
82 # commands, respectively.
84 acl_smtp_helo = check_helo
85 acl_smtp_rcpt = ${if ={$interface_port}{587} {check_submission}{check_recipient}}
86 acl_smtp_data = check_message
88 # accept domain literal syntax in e-mail addresses. To actually make use of
89 # this a router is also required
90 allow_domain_literals = true
92 # This setting defines a named domain list called
93 # local_domains. It will be referenced
94 # later on by the syntax "+local_domains".
95 # Other domain and host lists may follow.
96 # @ is the local FQDN, @[] matches the IP adress of any local interface.
98 .include_if_exists /etc/exim4/local-settings.conf
100 domainlist local_domains = @ : \
103 ${if exists {/etc/exim4/locals}{lsearch;/etc/exim4/locals}}
105 domainlist virtual_domains = partial-lsearch;/etc/exim4/virtualdomains
107 domainlist submission_domains = ${if exists {/etc/exim4/submission-domains}{/etc/exim4/submission-domains}{}}
109 domainlist handled_domains = +local_domains : +virtual_domains
111 localpartlist local_only_users = lsearch;/etc/exim4/localusers
113 # Domains we relay for; that is domains that aren't considered local but we
114 # accept mail for them.
115 domainlist rcpthosts = partial-lsearch;/etc/exim4/rcpthosts
116 hostlist debianhosts = 127.0.0.1 : net-lsearch;/var/lib/misc/thishost/debianhosts
117 domainlist mailhubdomains = lsearch;/etc/exim4/manualroute
119 hostlist reservedaddrs = <%= nodeinfo['reservedaddrs'] %>
122 if has_variable?("exim_ssl_certs") && exim_ssl_certs == true
123 out = "tls_certificate = /etc/exim4/ssl/thishost.crt
124 tls_privatekey = /etc/exim4/ssl/thishost.key
125 tls_try_verify_hosts = *
126 tls_verify_certificates = /etc/exim4/ssl/ca.crt
127 tls_crl = /etc/exim4/ssl/ca.crl"
132 # The setting below causes Exim to do a reverse DNS lookup on all incoming
133 # IP calls, in order to get the true host name. If you feel this is too
134 # expensive, you can specify the networks for which a lookup is done, or
135 # remove the setting entirely.
137 dns_ipv4_lookup = !localhost
139 # If this option is set, then any process that is running as one of the
140 # listed users may pass a message to Exim and specify the sender's
141 # address using the "-f" command line option, without Exim's adding a
144 untrusted_set_sender = *
146 # Some operating systems use the "gecos" field in the system password file
147 # to hold other information in addition to users' real names. Exim looks up
148 # this field when it is creating "sender" and "from" headers. If these options
149 # are set, exim uses "gecos_pattern" to parse the gecos field, and then
150 # expands "gecos_name" as the user's name. $1 etc refer to sub-fields matched
153 gecos_pattern = ^([^,:]*)
156 # This tells exim to immediately discard error messages (ie double bounces).
157 ignore_bounce_errors_after = 0s
159 timeout_frozen_after=14d
161 message_size_limit = 100M
163 smtp_accept_max = 300
164 smtp_accept_max_per_host = ${if match_ip {$sender_host_address}{+debianhosts}{0}{7}}
165 smtp_accept_queue = 200
166 smtp_accept_queue_per_connection = 50
167 smtp_accept_reserve = 25
168 smtp_reserve_hosts = +debianhosts
170 split_spool_directory = true
171 check_spool_inodes = 200
172 check_spool_space = 20M
177 deliver_queue_load_max = 50
179 queue_list_requires_admin = false
182 if has_variable?("clamd") && clamd == "true"
183 out = "av_scanner = clamd:/var/run/clamav/clamd.ctl"
190 out = "daemon_smtp_ports = "
193 if results['bugsmaster']
197 if not results['mail_port'].empty?
198 ports << results['mail_port']
201 if results['mailrelay']
202 ports << results['smarthost_port']
205 out += ports.uniq.sort.join(" : ")
210 remote_sort_domains = *.debian.org:*.debian.net
212 pipelining_advertise_hosts = !*
214 if has_variable?("exim_ssl_certs") && exim_ssl_certs == true
215 out = 'tls_advertise_hosts = *'
219 smtp_enforce_sync = true
221 log_selector = +tls_cipher +tls_peerdn +queue_time +deliver_time +smtp_connection +smtp_incomplete_transaction +smtp_confirmation
223 received_header_text = Received: ${if def:sender_rcvhost {from $sender_rcvhost\n\t}\
224 {${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}\
225 ${if and {{eq {$tls_certificate_verified}{1}}{def:tls_peerdn}}{from $tls_peerdn (verified)\n\t}}\
226 by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher)\n\t}}\
227 (Exim $version_number)\n\t\
228 ${if def:sender_address {(envelope-from <$sender_address>)\n\t}}\
229 id $message_exim_id${if def:received_for {\n\tfor $received_for}}
233 VDOMAINDATA = ${lookup{$domain}partial-lsearch{/etc/exim4/virtualdomains}{$value}}
234 WHITELIST = ${if match_domain{$domain}{+virtual_domains}{\
235 ${if exists {/srv/$domain/mail/whitelist}{\
236 ${lookup{$local_part}lsearch{/srv/$domain/mail/whitelist}{$value}{}}\
238 }{${lookup{$local_part}lsearch{/etc/exim4/whitelist}{$value}{}} : ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-whitelist}{$value}{}}}}
239 GREYLIST_LOCAL_PARTS = ${if match_domain{$domain}{+virtual_domains}\
240 {${if exists {${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}\
241 {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}{$local_part}{}}}{}}}\
242 {${lookup{$local_part}lsearch{/etc/exim4/grey_users}{$local_part}{}} : \
243 ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-greylist}{$local_part}{}}}}
244 RT_QUEUE_MAP = /srv/rt.debian.org/mail/rt_queue_map
246 ######################################################################
247 # ACL CONFIGURATION #
248 ######################################################################
257 if results['mailrelay']
258 out = " accept verify = certificate"
263 # These are in HELO acl so that they are only run once. They increment a counter,
264 # so we don't want it to increment per rcpt to.
266 warn dnslists = list.dnswl.org&0.0.0.3
267 log_message = Hit on list.dnswl.org for $sender_host_address
268 set acl_c1 = ${eval:$acl_c1-30}
270 warn dnslists = list.dnswl.org&0.0.0.2
271 log_message = Hit on list.dnswl.org for $sender_host_address
272 set acl_c1 = ${eval:$acl_c1-20}
274 warn dnslists = list.dnswl.org
275 log_message = Hit on list.dnswl.org for $sender_host_address
276 set acl_c1 = ${eval:$acl_c1-10}
278 warn condition = ${if isip {$sender_helo_name}{true}{false}}
279 log_message = remote host used IP address in HELO/EHLO greeting
280 set acl_c1 = ${eval:$acl_c1+20}
282 warn !hosts = +debianhosts
283 condition = ${if eq{$host_lookup_failed}{1}}
284 set acl_c1 = ${eval:$acl_c1+20}
286 warn !hosts = +debianhosts
287 condition = ${if eq{$host_lookup_failed}{0}}
288 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}}
289 set acl_c1 = ${eval:$acl_c1+20}
291 warn !hosts = +debianhosts
292 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}}
293 set acl_c1 = ${eval:$acl_c1+20}
295 warn !hosts = +debianhosts
296 dnslists = dul.dnsbl.sorbs.net
297 set acl_c1 = ${eval:$acl_c1+15}
299 # If the sender's helo name is empty, the message will be rejected later
300 # because the helo is empty. If the rDNS lookup failed, we are already
301 # going to greylist them, so no sense worrying about it here. Finally,
302 # if rDNS does not match helo name (both lower cased first), greylist.
304 warn !hosts = +debianhosts
305 condition = ${if eq {$host_lookup_failed}{1}{no}{yes}}
306 condition = ${if def:sender_helo_name {yes}{no}}
307 condition = ${if eq {${lc:$sender_helo_name}}{${lc:$sender_host_name}}{no}{yes}}
308 log_message = HELO doesn't match rDNS
309 set acl_c1 = ${eval:$acl_c1+8}
312 # matches 098325879 - looks fishy
314 warn condition = ${if and { \
315 { !match{$sender_helo_name}{\N^\[.+\]$\N} } \
316 { !match{$sender_helo_name}{\N^(?i)((?=[^-])[a-z0-9-]*[a-z0-9]\.)+[a-z]{2,6}$\N} } \
319 log_message = non-FQDN HELO
320 set acl_c1 = ${eval:$acl_c1+12}
322 # Matches DOMAIN99.com - looks bad
324 warn condition = ${if match {$sender_helo_name}{\N^[A-Z]+[A-Z0-9\-]+\.[A-Za-z0-9]+$\N}}
325 log_message = SHOUTING HELO
326 set acl_c1 = ${eval:$acl_c1+7}
328 # Random HELO (run of 7 consonants) (constructed by viruses). We purposefully
329 # skip matching on machines named .*smtp.*, since that's 4 already. This is a fairly
330 # naive test, so it's not worth much
332 warn condition = ${if match {${lc:$sender_helo_name}}{smtp}{no}{yes}}
333 condition = ${if match {${lc:$sender_helo_name}}{\N^[a-z0-9]+\.[a-z]+$\N}}
334 condition = ${if match {${lc:$sender_helo_name}}{\N.*[bcdfghjklmnpqrstvwxz]{7,}.*\.[a-z]+$\N}}
335 log_message = random HELO
336 set acl_c1 = ${eval:$acl_c1+5}
338 # Implicit, but simpler to just say it
341 #!!# ACL that is used after the RCPT command on the submission port
344 # Accept if the source is local SMTP (i.e. not over TCP/IP).
345 # We do this by testing for an empty sending host field.
346 accept hosts = : 127.0.0.1
350 if results['mailrelay']
351 out = " accept verify = certificate"
356 # Defer after too many bad RCPT TO's. Legit MTAs will retry later.
357 # This is a rough pass at preventing addres harvesting or other mail blasts.
359 defer log_message = Too many bad recipients ${eval:$rcpt_fail_count} out of $rcpt_count
360 message = Too many bad recipients, try again later
361 condition = ${if > {${eval:$rcpt_fail_count}}{3}{yes}{no}}
364 ratelimit = 5 / 60m / per_rcpt / $sender_host_address
365 !hosts = +debianhosts
366 message = sorry, only 5 reports per hour for submission
368 accept domains = +local_domains
371 message = unknown user
374 accept domains = +mailhubdomains
376 message = unknown user
377 verify = recipient/callout=30s,defer_ok,use_sender,no_cache
379 accept domains = +submission_domains
381 message = unknown user
384 deny message = relay not permitted
386 #!!# ACL that is used after the RCPT command
391 if results['mailrelay']
392 out = " accept verify = certificate"
397 # Defer after too many bad RCPT TO's. Legit MTAs will retry later.
398 # This is a rough pass at preventing addres harvesting or other mail blasts.
400 defer log_message = Too many bad recipients ${eval:$rcpt_fail_count} out of $rcpt_count
401 message = Too many bad recipients, try again later
402 !hosts = +debianhosts
403 condition = ${if > {${eval:$rcpt_fail_count}}{3}{yes}{no}}
405 # Dump spambots that are so stupid they say helo as our IP address
407 drop !hosts = +debianhosts
408 condition = ${if eq {$sender_helo_name}{$interface_address}{yes}{no}}
409 message = HELO mismatch Forged HELO for ($sender_helo_name)
411 # Also for spambots that say helo as us or one of our domains
413 drop !hosts = +debianhosts
414 condition = ${if match_domain{$sender_helo_name}{$primary_hostname:+handled_domains}}
415 condition = ${if !match{$sender_host_name}{${rxquote:$sender_helo_name}\N$\N}}
416 message = HELO mismatch Forged HELO for ($sender_helo_name)
418 # This logic gives you a list of commonly forged domains in helo to reject against
420 warn set acl_m2 = ${lookup{$sender_helo_name} \
421 nwildlsearch{/etc/exim4/helo-check} \
422 {${if eq{$value}{}{$sender_helo_name}{$value}}}{}}
424 # This is a failsafe in case DNS fails - we defer instead of hard reject if they
425 # say helo as a name in the list but we can't look them up
427 defer !hosts = +debianhosts
428 condition = ${if eq{$acl_m2}{}{no}{yes}}
429 condition = ${if eq{$sender_host_name}{}{yes}{no}}
430 condition = ${if eq{$host_lookup_failed}{1}{no}{yes}}
431 message = Access temporarily denied. Resolve failed PTR for $sender_host_address
433 # If DNS works, go ahead and reject them
435 drop !hosts = +debianhosts
436 condition = ${if and { {!eq{$acl_m2}{}}{!match{$sender_host_name}{${rxquote:$acl_m2}\N$\N}}}{yes}{no}}
437 message = HELO mismatch Forged HELO for ($sender_helo_name)
439 # disabled accounts don't even get local mail.
440 deny local_parts = lsearch;/var/lib/misc/$primary_hostname/mail-disable
441 domains = +local_domains
442 message = ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-disable}{$value}}
444 deny domains = +virtual_domains
445 local_parts = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/localonly}}}\
446 {${extract{directory}{VDOMAINDATA}{${value}/localonly}}}\
448 hosts = !+debianhosts
449 message = mail for <$local_part@$domain> only accepted from debian.org machines
450 # Accept if the source is local SMTP (i.e. not over TCP/IP).
451 # We do this by testing for an empty sending host field.
454 deny domains = +handled_domains
455 local_parts = ^[.] : ^.*[@%!/|]
457 deny domains = !+handled_domains
458 local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
460 # forwards mail to @d.o address, even if it's a bounce from master, no reply
461 # from source address; rejecting all mail now.
462 deny recipients = mendoza@debian.org
463 hosts = 65.110.39.147 : 64.39.31.15
464 message = <mendoza@kenny.linuxsis.net> cannot forward here while mailer-daemon mail is not caught
466 deny condition = ${lookup{$sender_address_local_part}lsearch{/etc/exim4/localusers}{true}}
467 sender_domains= +local_domains : debian.org : debian.net : debian.com
468 hosts = !+debianhosts
469 message = mail from <$sender_address> not allowed externally
471 deny condition = ${if match_domain{$sender_address_domain}{+virtual_domains}{1}{0}}
472 condition = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/neversenders}}}{1}{0}}
473 condition = ${if match_local_part {$sender_address_local_part}{${extract{directory}{VDOMAINDATA}{${value}/neversenders}}}{1}{0}}
474 message = no mail should ever come from <$sender_address>
476 deny local_parts = +local_only_users
477 domains = +local_domains
478 hosts = !+debianhosts
479 message = mail for $local_part is only accepted internally
481 deny message = address $sender_host_address is listed in $dnslist_domain; $dnslist_text
482 hosts = !+debianhosts
483 dnslists = rbl.debian.net : rbl.debian.net/$sender_address_domain
485 deny !recipients = survey@popcon.debian.org
488 defer !hosts = +debianhosts
489 condition = ${if >{${eval:$acl_c1}}{0}}
490 ratelimit = 10 / 60m / per_rcpt / $sender_host_address
491 message = slow down (no reverse dns, mismatched ehlo, dialup, or in blacklists)
495 if has_variable?("policydweight") && policydweight == "true"
497 # Check with policyd-weight - this only works with a version after etch\'s,
498 # sadly. etch\'s version attempts to hold the socket open, since that\'s what
499 # postfix expects. Exim, on the other hand, expects the remote side to close
500 # the socket when it\'s finished sending data, so it see each transaction as
501 # an incomplete read. I\'m sure there\'s a way we could force exim to do
502 # something sick and clever to force either the interpretation or the socket
503 # closure, but I\'m fairly sure it\'s now worth it, since the backport of
504 # policyd-weight is trivial.
505 warn !hosts = +debianhosts
506 set acl_m9 = ${readsocket{inet:127.0.0.1:12525}\
507 {request=smtpd_access_policy\n\
508 protocol_state=RCPT\n\
509 protocol_name=${uc:$received_protocol}\n\
510 helo_name=$sender_helo_name\n\
511 queue_id=$message_exim_id\n\
512 sender=$sender_address\n\
513 recipient=$local_part@$domain\n\
514 recipient_count=$rcpt_count\n\
515 client_address=$sender_host_address\n\
516 client_name=$sender_host_name\n\
517 reverse_client_name=$sender_host_name\n\
518 instance=$sender_host_address.$sender_address.$sender_helo_name\n\n}\
519 {20s}{\n}{socket failure}}
521 # Defer on socket error
522 defer !hosts = +debianhosts
523 condition = ${if eq{$acl_m9}{socket failure}{yes}{no}}
524 message = Cannot connect to policyd-weight. Please try again later.
526 # Set proposed action to $acl_m8 and message to $acl_m7
527 warn !hosts = +debianhosts
528 set acl_m8 = ${extract{action}{$acl_m9}}
529 set acl_m7 = ${sg{$acl_m9}{\Naction=[^ ]+ (.*)\n\n\N}{\$1}}
531 # Add X-policyd-weight header line to message
532 warn !hosts = +debianhosts
534 condition = ${if eq{$acl_m8}{PREPEND}{yes}{no}}
536 # Write log message, if policyd-weight can\'t run checks
537 warn !hosts = +debianhosts
538 log_message = policyd-weight message: $acl_m7
539 condition = ${if eq{$acl_m8}{DUNNO}{yes}{no}}
541 # Deny mails which policyd-weight thinks are spam
542 deny !hosts = +debianhosts
543 message = policyd-weight said: $acl_m7
544 condition = ${if eq{$acl_m8}{550}{yes}{no}}
546 # Defer messages when policyd-weight suggests so.
547 defer !hosts = +debianhosts
548 message = policyd-weight said: $acl_m7
549 condition = ${if eq{$acl_m8}{450}{yes}{no}}
554 warn recipients = survey@popcon.debian.org
555 set acl_m1 = PopconMail
557 warn domains = rt.debian.org
559 set acl_m12 = ${if def:acl_m12 {$acl_m12} {${if or{{match{$local_part}{[^+]+\\+\\d+}}{match{$local_part}{[^+]+\\+new}}} {RTMailRecipientHasSubaddress}}}}
561 warn domains = packages.qa.debian.org
564 warn recipients = owner@packages.qa.debian.org : postmaster@packages.qa.debian.org
565 set acl_m1 = PTSOwner
567 warn recipients = change@db.debian.org : changes@db.debian.org : chpasswd@db.debian.org : ping@db.debian.org : recommend@nm.debian.org
568 set acl_m1 = DBSignedMail
571 domains = packages.qa.debian.org
572 condition = ${if match{$local_part}{\N^bounces+\N}}
573 set acl_m1 = PTSListBounce
577 if has_variable?("greylistd") && greylistd == "true"
580 message = $sender_host_address is not yet authorized to deliver mail from <$sender_address> to <$local_part@$domain>.
581 log_message = greylisted.
582 local_parts = ${if match_domain{$domain}{+virtual_domains}\
583 {${if exists {${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}\
584 {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}{$local_part}{}}}{}}}\
585 {${lookup{$local_part}lsearch{/etc/exim4/grey_users}{$local_part}{}} : \
586 ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-greylist}{$local_part}{}}}}
588 !hosts = : +debianhosts : WHITELIST : \
589 ${if exists {/etc/greylistd/whitelist-hosts}\
590 {/etc/greylistd/whitelist-hosts}{}} : \
591 ${if exists {/var/lib/greylistd/whitelist-hosts}\
592 {/var/lib/greylistd/whitelist-hosts}{}}
594 domains = +handled_domains : +rcpthosts
595 condition = ${readsocket{/var/run/greylistd/socket}\
597 $sender_host_address \
599 $local_part@$domain}\
602 elsif has_variable?("postgrey") && postgrey == "true"
604 # next three are greylisting, inspired by http://www.bebt.de/blog/debian/archives/2006/07/30/T06_12_27/index.html
605 # this adds acl_m4 if there isn\'t one (so unique per message)
608 !hosts = : +debianhosts : WHITELIST
609 condition = ${if def:acl_m4 {no}{yes}}
610 set acl_m4 = $pid.$tod_epoch.$sender_host_port
612 # and defers the message if postgrey thinks it should be defered ...
615 !hosts = : +debianhosts : WHITELIST
617 domains = +handled_domains : +rcpthosts
618 local_parts = GREYLIST_LOCAL_PARTS
619 set acl_m3 = request=smtpd_access_policy\n\
620 protocol_state=RCPT\n\
621 protocol_name=${uc:$received_protocol}\n\
622 instance=${acl_m4}\n\
623 helo_name=${sender_helo_name}\n\
624 client_address=${substr_-3:${mask:$sender_host_address/24}}\n\
625 client_name=${sender_host_name}\n\
626 sender=${sender_address}\n\
627 recipient=$local_part@$domain\n\n
629 ${readsocket{/var/run/postgrey/socket}{$acl_m3}\
630 {5s}{}{action=DUNNO}}\
632 message = ${sg{$acl_m3}{^\\w+\\s*}{}}
633 log_message = greylisted.
634 condition = ${if eq{${uc:${substr{0}{5}{$acl_m3}}}}{DEFER}}
636 # ... or adds a header with information about how long the delay was
639 !hosts = : +debianhosts : WHITELIST
641 domains = +handled_domains : +rcpthosts
642 local_parts = GREYLIST_LOCAL_PARTS
643 condition = ${if eq{${uc:${substr_0_7:$acl_m3}}}{PREPEND}}
644 message = ${sg{$acl_m3}{^\\w+\\s*}{}}
649 accept local_parts = postmaster
650 domains = +handled_domains : +rcpthosts
652 deny log_message = <$sender_address> is blacklisted
653 senders = ${if exists{/etc/exim4/blacklist}{/etc/exim4/blacklist}{}}
654 message = We have blacklisted <$sender_address>. Please stop mailing us
656 deny message = host $sender_host_address is listed in $dnslist_domain; see $dnslist_text
657 dnslists = ${if match_domain{$domain}{+virtual_domains}\
658 {${if exists {${extract{directory}{VDOMAINDATA}{${value}/rbllist}}}\
659 {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/rbllist}}}{$value}{}}}{}}}\
660 {${lookup{$local_part}lsearch{/etc/exim4/rbllist}{$value}{}} : \
661 ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-rbl}{$value}{}}}}
662 domains = +handled_domains : +rcpthosts
663 !hosts = +debianhosts : WHITELIST
665 deny message = domain $sender_address_domain is listed in $dnslist_domain; see $dnslist_text
666 dnslists = ${if match_domain{$domain}{+virtual_domains}\
667 {${if exists {${extract{directory}{VDOMAINDATA}{${value}/rhsbllist}}}\
668 {${expand:${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/rhsbllist}}}{$value}{}}}}{}}}\
669 {${expand:${lookup{$local_part}lsearch{/etc/exim4/rhsbllist}{$value}{}}} : \
670 ${expand:${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-rhsbl}{$value}{}}}}}
671 domains = +handled_domains : +rcpthosts
672 !hosts = +debianhosts : WHITELIST
674 deny domains = +handled_domains : +rcpthosts
675 local_parts = ${if match_domain{$domain}{+virtual_domains}\
676 {${if exists {${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}\
677 {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}{$local_part}{}}}{}}}\
678 {${lookup{$local_part}lsearch{/etc/exim4/callout_users}{$local_part}{}} : \
679 ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-callout}{$local_part}{}}}}
680 !hosts = +debianhosts : WHITELIST
681 !verify = sender/callout
683 accept domains = +mailhubdomains
685 message = unknown user
686 verify = recipient/callout=30s,defer_ok,use_sender,no_cache
688 accept domains = +handled_domains
690 message = unknown user
691 verify = recipient/defer_ok
693 accept domains = +rcpthosts
695 message = unrouteable address
698 accept hosts = +debianhosts
700 accept authenticated = *
702 deny message = relay not permitted
704 #!!# ACL that is used after the DATA command
706 require verify = header_syntax
707 message = Invalid syntax in the header
709 deny condition = ${if eq {$acl_m1}{RTMail}}
710 condition = ${if and{{!match {${lc:$rh_Subject:}} {debian rt}} \
711 {!match {${lc:$rh_Subject:]}} {\\[rt.debian.org }} \
712 {!match {$acl_m12}{RTMailRecipientHasSubaddress}}}}
713 message = messages to the Request Tracker system require a subject tag or a subaddress
715 deny !hosts = +debianhosts : 217.196.43.134
716 condition = ${if eq {$acl_m1}{PTSMail}}
717 condition = ${if def:h_X-PTS-Approved:{false}{true}}
718 message = messages to the PTS require an X-PTS-Approved header
720 deny condition = ${if match {$message_body}{\Nhttp:\/\/[a-z\.-]+\/video1?.exe\N}}
721 message = Blackisted URI found in body
723 deny condition = ${if eq {$acl_m1}{DBSignedMail}}
724 condition = ${if and {{!match {$message_body}{PGP MESSAGE}} \
725 {!match {$message_body}{PGP SIGNED MESSAGE}} \
726 {!match {$message_body}{PGP SIGNATURE}} \
727 {!match {$header_content-type:}{multipart/signed}} \
728 {!match {$header_content-type:}{pgp}} \
731 message = Mail to this address needs to be PGP-signed
733 # RFC 822 and 2822 say that headers must be ASCII. This kinda emulates
734 # postfix's strict_7bit_headers option, but only checks a few common problem
735 # headers, as there doesn't appear to be an easy way to check them all.
737 condition = ${if or {{match {$rh_Subject:}{[\200-\377]}}\
738 {match {$rh_To:}{[\200-\377]}}\
739 {match {$rh_From:}{[\200-\377]}}\
740 {match {$rh_Cc:}{[\200-\377]}}}{true}{false}}
741 message = improper use of 8-bit data in message header: message rejected
744 condition = ${if match {$rh_Subject:}{[^[:print:]]\{8\}}{true}{false}}
745 message = Your mailer is not RFC 2047 compliant: message rejected
749 if has_variable?("clamd") && clamd == "true"
754 message = malware detected: $malware_name: message rejected
760 deny spam = $value/defer_ok
761 domains = +handled_domains : +rcpthosts
762 message = message got a spam score of $spam_score
763 local_parts = ${if exists {/etc/exim4/sa_users}\
764 {${if match_domain{$domain}{+virtual_domains}\
765 {${lookup{$local_part@$domain}nwildlsearch{/etc/exim4/sa_users}{$local_part}{}}}\
766 {${lookup{$local_part}lsearch{/etc/exim4/sa_users}{$local_part}{}}}}}}
768 # Check header_sender except for survey@popcon.d.o
769 deny condition = ${if eq{$acl_m1}{PopconMail}{false}{true}}
770 !verify = header_sender
771 message = No valid sender found in the From:, Sender: and Reply-to: headers
777 ######################################################################
778 # REWRITE CONFIGURATION #
779 ######################################################################
785 \N^buildd_(.*)@ries\.debian\.org$\N buildd_$1@buildd.debian.org T
786 \N^buildd_(.*)@klecker\.debian\.org$\N buildd_$1@buildd.debian.org T
787 *@debian.org ${lookup{$1}cdb{/var/lib/misc/${primary_hostname}/mail-forward.cdb}{$value}fail} T
788 *@people.debian.org ${lookup{$1}cdb{/var/lib/misc/${primary_hostname}/mail-forward.cdb}{$value}fail} T
789 #*@${primary_hostname} "${if exists{/etc/exim4/email-addresses}{${lookup{$1}lsearch{/etc/exim4/email-addresses}{$value}fail}}fail}" fFs
790 m68k@buildd.debian.org m68k-build@nocrew.org Ttrbc
793 #!!#######################################################!!#
794 #!!# Here follow routers created from the old routers, #!!#
795 #!!# for handling non-local domains. #!!#
796 #!!#######################################################!!#
802 ######################################################################
803 # ROUTERS CONFIGURATION #
804 # Specifies how addresses are handled #
805 ######################################################################
806 # ORDER DOES MATTER #
807 # An address is passed to each in turn until it is accepted. #
808 ######################################################################
812 if results['mailrelay']
816 domains = +mailhubdomains
817 transport = remote_smtp
818 route_data = ${lookup{$domain}lsearch{/etc/exim4/manualroute}}
819 require_files = /etc/exim4/manualroute
826 debug_print = "R: bsmtp for $local_part@$domain"
828 domains = !+local_domains
829 require_files = /etc/exim4/bsmtp
830 route_list = * ${extract{file}{\
831 ${lookup{$domain}partial-lsearch{/etc/exim4/bsmtp}\
835 # This router routes to remote hosts over SMTP by explicit IP address,
836 # given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
837 # require this facility, which is why it is enabled by default in Exim.
839 debug_print = "R: ipliteral for $local_part@$domain"
841 domains = !+handled_domains
842 transport = remote_smtp
843 ignore_target_hosts = +reservedaddrs
847 if not results['smarthost'].empty?
850 debug_print = "R: smarthost for $local_part@$domain"
852 domains = !+handled_domains
853 transport = remote_smtp_smarthost
854 route_list = * ' + smarthost + '
855 host_find_failed = defer
856 same_domain_copy_routing = yes
863 # This router routes to remote hosts over SMTP using a DNS lookup.
864 # Ignore reserved network responses, including localhost.
866 debug_print = "R: dnslookup for $local_part@$domain"
868 domains = !+handled_domains
869 transport = remote_smtp
870 ignore_target_hosts = +reservedaddrs
873 # This router handles aliasing using a traditional /etc/aliases file.
874 # If any of your aliases expand to pipes or files, you will need to set
875 # up a user and a group for these deliveries to run under. You can do
876 # this by uncommenting the "user" option below (changing the user name
877 # as appropriate) and adding a "group" option if necessary.
880 debug_print = "R: system_aliases for $local_part@$domain"
884 data = ${lookup{$local_part}lsearch*{/etc/aliases}}
885 domains = +local_domains
886 file_transport = address_file
887 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
888 pipe_transport = address_pipe
891 # This router handles forwarding using traditional .forward files.
892 # It also allows mail filtering when a forward file starts with the
893 # string "# Exim filter": to disable filtering, uncomment the "filter"
894 # option. The check_ancestor option means that if the forward file
895 # generates an address that is an ancestor of the current one, the
896 # current one gets passed on instead. This covers the case where A is
897 # aliased to B and B has a .forward file pointing to A.
899 # For standard debian setup of one group per user, it is acceptable---normal
900 # even---for .forward to be group writable. If you have everyone in one
901 # group, you should comment out the "modemask" line. Without it, the exim
902 # default of 022 will apply, which is probably what you want.
905 debug_print = "R: userforward for $local_part${local_part_suffix}@$domain"
910 directory_transport = address_directory
911 domains = +local_domains
912 # filter - I have disabled filtering to force users to use .forward-foo files
913 # or procmail. This will make it easier to move mailers in the future
915 # This bit does the qmailesque extension names, foo-bar@ is .forward-foo it
916 # also checks if the .forward-bar exists, if not then it uses
917 # .forward-default instead.
918 file = $home/.forward\
919 ${if eq{}{$local_part_suffix}{}{\
920 ${if exists {${home}/.forward${local_part_suffix}} \
921 {${local_part_suffix}}{-default}}\
924 file_transport = address_file
925 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
926 local_part_suffix = -*
927 local_part_suffix_optional
929 pipe_transport = address_pipe
930 reply_transport = address_reply
931 require_files = $home
932 router_home_directory = ${lookup passwd{$local_part}{${extract{5}{:}{$value}}}fail}
936 debug_print = "R: userforward for $local_part${local_part_suffix}@$domain"
940 directory_transport = address_directory
941 domains = +local_domains
942 # filter - I have disabled filtering to force users to use .forward-foo files
943 # or procmail. This will make it easier to move mailers in the future
945 # This bit does the qmailesque extension names, foo-bar@ is .forward-foo it
946 # also checks if the .forward-bar exists, if not then it uses
947 # .forward-default instead.
948 file = $home/.forward\
949 ${if eq{}{$local_part_suffix}{}{\
950 ${if exists {${home}/.forward${local_part_suffix}} \
951 {${local_part_suffix}}{-default}}\
954 file_transport = address_file
955 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
956 local_part_suffix = -*
957 local_part_suffix_optional
959 pipe_transport = address_pipe
960 reply_transport = address_reply
961 require_files = $home
964 # This delivers to procmail
966 debug_print = "R: procmail for $local_part@$domain"
969 domains = +local_domains
970 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
973 require_files = $local_part:$home/.procmailrc
974 transport = procmail_pipe
975 transport_current_directory = $home
977 # This driver delivers to the LDAP generated alias file.
979 debug_print = "R: ldap_aliases for $local_part@$domain"
983 data = ${if exists{/var/lib/misc/$primary_hostname/mail-forward.cdb}\
984 {${lookup{$local_part}cdb\
985 {/var/lib/misc/$primary_hostname/mail-forward.cdb}}}}
986 domains = +local_domains
987 file_transport = address_file
988 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
989 pipe_transport = address_pipe
992 # This director matches local user mailboxes.
994 debug_print = "R: localuser for $local_part@$domain"
997 domains = +local_domains
998 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
999 # Disable if the user has never logged in
1000 require_files = $home
1001 transport = local_delivery
1004 # Now we begin the Virtual Domain configuration
1005 # Everything before here should apply only to the local domains with a
1008 # exim4 fails the router if it can't change to the user/group for delivery
1009 # during verification. So we have to seperate the cases of verifying
1010 # the virts, and delivering to them. blah.
1013 if results['packagesmaster']
1015 # This router delivers for packages.d.o
1017 debug_print = "R: packages for $local_part@$domain"
1019 file_transport = address_file
1020 pipe_transport = address_pipe
1021 domains = packages.debian.org
1022 require_files = /org/packages.debian.org/conf/maintainer
1023 data = ${lookup{$local_part}cdb{/org/packages.debian.org/conf/maintainer.cdb}}
1024 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1025 transport_home_directory = /org/packages.debian.org/mail
1026 transport_current_directory = /org/packages.debian.org/mail
1028 retry_use_local_part
1037 if results['bugsmaster']
1039 # This router delivers for bugs.d.o
1041 debug_print = "R: bugs for $local_part@$domain"
1043 transport = bugs_pipe
1044 domains = bugs.debian.org
1045 cannot_route_message = Unknown or archived bug
1046 require_files = /org/bugs.debian.org/mail/run-procmail
1048 local_parts = ${if match\
1050 {\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}\
1051 {${if exists{/org/bugs.debian.org/spool/db-h/$2/$1$2.summary}\
1052 {$local_part}fail}}fail}
1060 if results['rtmaster']
1062 # This router delivers for rt.d.o
1063 rt_force_new_verbose:
1064 debug_print = "R: rt for $local_part+new@$domain"
1066 domains = rt.debian.org
1067 require_files = /usr/bin/rt-mailgate : RT_QUEUE_MAP
1068 local_parts = ${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}{$local_part}{}}
1069 local_part_suffix = +new
1070 pipe_transport = rt_pipe
1071 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}}"
1072 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1074 # FIXME: figure out how to generalize this approach so that all of the following would work
1075 # - rt+NNNN@rt.debian.org : attach correspondence to ticket (verbose)
1076 # - rt+NNNN-quiesce@rt.debian.org : attach correspondence to ticket (quiesce)
1077 # - rt+NNNN-<action>@rt.debian.org : attach correspondence to ticket (some action)
1078 # requires modification to custom condition in 'scrips'
1079 rt_force_new_quiesce:
1080 debug_print = "R: rt for $local_part+new-quiesce@$domain"
1082 domains = rt.debian.org
1083 require_files = /usr/bin/rt-mailgate : RT_QUEUE_MAP
1084 local_parts = ${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}{$local_part}{}}
1085 local_part_suffix = +new-quiesce
1086 pipe_transport = rt_pipe
1087 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}}"
1088 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}\nX-RT-Mode: quiesce"
1091 debug_print = "R: rt for $local_part@$domain"
1093 domains = rt.debian.org
1094 require_files = /usr/bin/rt-mailgate : RT_QUEUE_MAP
1095 local_parts = ${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}{$local_part}{}}
1096 local_part_suffix = +*
1097 local_part_suffix_optional
1098 pipe_transport = rt_pipe
1099 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}}"
1100 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1107 debug_print = "R: virt_aliases for $local_part@$domain"
1109 data = ${if exists{\
1110 ${extract{directory}{VDOMAINDATA}{${value}/aliases}}}\
1111 {${lookup{$local_part}lsearch*{\
1112 ${extract{directory}{VDOMAINDATA}{$value/aliases}}\
1114 directory_transport = address_directory
1115 cannot_route_message = Unknown user
1116 domains = +virtual_domains
1117 file_transport = address_file
1118 pipe_transport = address_pipe
1119 qualify_preserve_domain
1120 retry_use_local_part
1121 transport_current_directory = ${extract{directory}{VDOMAINDATA}}
1122 transport_home_directory = ${extract{directory}{VDOMAINDATA}}
1126 debug_print = "R: virt_direct for $local_part@$domain"
1132 directory_transport = address_directory
1133 domains = +virtual_domains
1134 file = $home/.forward-\
1135 ${if exists {${home}/.forward-${local_part}}{${local_part}}\
1137 file_transport = address_file
1138 pipe_transport = address_pipe
1139 reply_transport = address_reply
1140 retry_use_local_part
1141 router_home_directory = ${extract{directory}{VDOMAINDATA}}
1142 transport_current_directory = ${extract{directory}{VDOMAINDATA}}
1145 # This is a senmailesque alias file lookup
1147 debug_print = "R: virt_aliases for $local_part@$domain"
1151 data = ${if exists{\
1152 ${extract{directory}{VDOMAINDATA}{${value}/aliases}}}\
1153 {${lookup{$local_part}lsearch*{\
1154 ${extract{directory}{VDOMAINDATA}{$value/aliases}}\
1156 directory_transport = address_directory
1157 domains = +virtual_domains
1158 file_transport = ${if eq {${extract{group_writable}{VDOMAINDATA}}}{true}{address_file_group}{address_file}}
1159 cannot_route_message = Unknown user
1160 group = ${extract{group}{VDOMAINDATA}}
1161 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1162 pipe_transport = address_pipe
1163 qualify_preserve_domain
1164 retry_use_local_part
1165 transport_current_directory = ${extract{directory}{VDOMAINDATA}}
1166 transport_home_directory = ${extract{directory}{VDOMAINDATA}}
1168 user = ${extract{user}{VDOMAINDATA}}
1170 # This is a qmailesque deliver into a directory of .forward files
1172 debug_print = "R: virt_direct for $local_part@$domain"
1178 directory_transport = address_directory
1179 domains = +virtual_domains
1180 file = $home/.forward-\
1181 ${if exists {${home}/.forward-${local_part}}{${local_part}}\
1183 file_transport = ${if eq {${extract{group_writable}{VDOMAINDATA}}}{true}{address_file_group}{address_file}}
1184 group = ${extract{group}{VDOMAINDATA}}
1185 headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}"
1187 pipe_transport = address_pipe
1188 reply_transport = address_reply
1189 retry_use_local_part
1190 router_home_directory = ${extract{directory}{VDOMAINDATA}}
1191 transport_current_directory = ${extract{directory}{VDOMAINDATA}}
1193 user = ${extract{user}{VDOMAINDATA}}
1194 #debug_print = .forward-${if exists {${home}/.forward-${local_part}} {${local_part}} {default}}
1196 ######################################################################
1197 # TRANSPORTS CONFIGURATION #
1198 ######################################################################
1199 # ORDER DOES NOT MATTER #
1200 # Only one appropriate transport is called for each delivery. #
1201 ######################################################################
1206 # This transport is used for local delivery to user mailboxes. On debian
1207 # systems group mail is used so we can write to the /var/mail
1208 # directory. (The alternative, which most other unixes use, is to deliver
1209 # as the user's own group, into a sticky-bitted directory)
1212 file = /var/mail/${local_part}
1215 no_mode_fail_narrower
1218 # This transport is used for handling pipe addresses generated by alias
1219 # or .forward files. It has a conventional name, since it is not actually
1220 # mentioned elsewhere in this configuration file. (A different name *can*
1221 # be specified via the "address_pipe_transport" option if you really want
1222 # to.) If the pipe generates any standard output, it is returned to the sender
1223 # of the message as a delivery error. Set return_fail_output instead if you
1224 # want this to happen only when the pipe fails to complete normally.
1228 current_directory = ${home}
1229 environment = "EXTENSION=${substr_1:${local_part_suffix}}:\
1230 EXT=${substr_1:${local_part_suffix}}:\
1231 LOCAL=${local_part}${local_part_suffix}:\
1232 RECIPIENT=${local_part}${local_part_suffix}@${domain}"
1236 # This transport is used for handling file addresses generated by alias
1237 # or .forward files. It has a conventional name, since it is not actually
1238 # mentioned elsewhere in this configuration file.
1248 directory_mode = 0770
1249 mode_fail_narrower = false
1251 # This transport is used for handling file addresses generated by alias
1252 # or .forward files if the path ends in "/", which causes it to be treated
1253 # as a directory name rather than a file name. Each message is then delivered
1254 # to a unique file in the directory. If instead you want all such deliveries to
1255 # be in the "maildir" format that is used by some other mail software,
1256 # uncomment the final option below. If this is done, the directory specified
1257 # in the .forward or alias file is the base maildir directory.
1259 # Should you want to be able to specify either maildir or non-maildir
1260 # directory-style deliveries, then you must set up yet another transport,
1261 # called address_directory2. This is used if the path ends in "//" so should
1262 # be the one used for maildir, as the double slash suggests another level
1263 # of directory. In the absence of address_directory2, paths ending in //
1264 # are passed to address_directory.
1274 # This transport is used for handling autoreplies generated by the filtering
1275 # option of the forwardfile director. It has a conventional name, since it
1276 # is not actually mentioned elsewhere in this configuration file.
1280 # This transport is used for delivering messages over SMTP connections.
1284 connect_timeout = 1m
1287 if has_variable?("exim_ssl_certs") && exim_ssl_certs == "true"
1288 out = " tls_certificate = /etc/exim4/ssl/thishost.crt
1289 tls_privatekey = /etc/exim4/ssl/thishost.key"
1294 remote_smtp_smarthost:
1295 debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
1299 if not results['smarthost'].empty?
1300 out += " port = " + results['smarthost_port'] + "\n"
1303 if has_variable?("exim_ssl_certs") && exim_ssl_certs == "true"
1304 out += ' tls_tempfail_tryclear = false
1305 tls_certificate = /etc/exim4/ssl/thishost.crt
1306 tls_privatekey = /etc/exim4/ssl/thishost.key
1312 # Send the message to procmail
1315 command = /usr/bin/procmail -a ${substr_1:${local_part_suffix}}}
1317 user = ${local_part}
1326 user = ${extract{user}{\
1327 ${lookup{$domain}partial-lsearch{/etc/exim4/bsmtp}\
1333 if results['bugsmaster']
1337 command = /org/bugs.debian.org/mail/run-procmail
1338 environment = "EXTENSION=${substr_1:${local_part_suffix}}:\
1339 EXT=${substr_1:${local_part_suffix}}:\
1340 LOCAL=${local_part}${local_part_suffix}:\
1341 RECIPIENT=${local_part}${local_part_suffix}@${domain}"
1352 if results['rtmaster']
1355 debug_print = "T: rt_pipe for $local_part${local_part_suffix}@$domain"
1358 environment = EXTENSION=${substr_1:${local_part_suffix}}
1359 allow_commands = /usr/bin/rt-mailgate
1365 ######################################################################
1366 # RETRY CONFIGURATION #
1367 ######################################################################
1369 # This single retry rule applies to all domains and all errors. It specifies
1370 # retries every 15 minutes for 2 hours, then increasing retry intervals,
1371 # starting at 2 hours and increasing each time by a factor of 1.5, up to 16
1372 # hours, then retries every 8 hours until 4 days have passed since the first
1375 # Domain Error Retries
1376 # ------ ----- -------
1381 debian.org * F,2h,10m; G,16h,2h,1.5; F,14d,8h
1382 * * senders=: F,2h,10m
1383 * rcpt_4xx F,2h,5m; F,4h,10m; F,4d,15m
1384 * * F,2h,15m; G,16h,2h,1.5; F,4d,8h
1386 # End of Exim 4 configuration