Testsuite: testcase for Bug 2198
[users/jgh/exim.git] / test / confs / 0901
1 # Exim test configuration 0901
2 SERVER=
3 SRV=
4 LIST=
5 ALLOW=
6
7 exim_path = EXIM_PATH
8 keep_environment =
9 host_lookup_order = bydns
10 spool_directory = DIR/spool
11 log_file_path = DIR/spool/log/SERVER%slog
12 gecos_pattern = ""
13 gecos_name = CALLER_NAME
14 chunking_advertise_hosts = *
15 tls_advertise_hosts = ${if eq {SRV}{tls} {*}}
16
17 pipelining_advertise_hosts = :
18
19 # ----- Main settings -----
20
21 primary_hostname = testhost.test.ex
22 domainlist local_domains = @ : test.ex
23
24 acl_smtp_rcpt = check_recipient
25 acl_smtp_data_prdr = check_prdr
26 acl_smtp_data = check_data
27 trusted_users = CALLER
28 queue_only
29 smtp_receive_timeout = 2s
30 log_selector = +received_recipients
31
32 .ifdef _OPT_MAIN_TLS_CERTIFICATE
33 tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
34 tls_privatekey = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
35 .endif
36
37 ALLOW
38
39 # ----- ACL -----
40
41 begin acl
42
43 check_recipient:
44   accept hosts = :
45   accept domains = +local_domains
46   deny   message = relay not permitted
47
48 check_prdr:
49   accept local_parts = good
50   deny
51
52 check_data:
53   warn   message = X-acl-message-linecount: $message_linecount
54   accept
55
56 # ----- Routers -----
57
58 begin routers
59
60 to_server:
61   driver = accept
62   condition =   ${if !eq {SERVER}{server}}
63   transport =   remote_smtp${if eq {OPT}{dkim} {_dkim}}
64   errors_to =   ""
65
66 fail_remote_domains:
67   driver = redirect
68   domains = ! +local_domains
69   data = :fail: unrouteable mail domain "$domain"
70
71 localuser:
72   driver = accept
73   check_local_user
74   transport = local_delivery
75   headers_add = X-local-user: uid=$local_user_uid gid=$local_user_gid
76
77
78 # ----- Transports -----
79
80 begin transports
81
82 local_delivery:
83   driver = appendfile
84   delivery_date_add
85   envelope_to_add
86   file = DIR/test-mail/$local_part
87   headers_add = "X-body-linecount: $body_linecount\n\
88                  X-message-linecount: $message_linecount\n\
89                  X-received-count: $received_count"
90   return_path_add
91
92 remote_smtp:
93   driver = smtp
94   hosts =       127.0.0.1
95   port =        PORT_S
96   allow_localhost
97   command_timeout = 2s
98   final_timeout = 2s
99
100 remote_smtp_dkim:
101   driver = smtp
102   hosts =       127.0.0.1
103   port =        PORT_S
104   allow_localhost
105   command_timeout = 2s
106   final_timeout = 2s
107
108 .ifdef OPT
109   dkim_domain =         test.ex
110   dkim_selector =       sel
111   dkim_private_key =    DIR/aux-fixed/dkim/dkim.private
112 .ifndef HEADERS_MAXSIZE
113   dkim_sign_headers =   LIST
114 .endif
115 .endif
116
117 # ----- Retry -----
118
119 begin retry
120 * * F,30m,5m;
121 # End