summaryrefslogtreecommitdiff
path: root/test/confs/3500
blob: 68cf703be0da12e324e9495604df256427ad6649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Exim test configuration 3500

.include DIR/aux-var/std_conf_prefix

primary_hostname = myhost.test.ex

# ----- Main settings -----

domainlist local_domains = test.ex : *.test.ex

hostlist auth_hosts = 10.0.0.1 : 10.0.0.5
hostlist relay_hosts = 10.0.0.4
hostlist auth_relay_hosts = 10.0.0.3 : 10.0.0.4

acl_smtp_etrn = check_etrn
acl_smtp_expn = check_expn
acl_smtp_rcpt = check_recipient
acl_smtp_vrfy = check_vrfy
auth_advertise_hosts = +auth_hosts : !+relay_hosts : +auth_relay_hosts : \
                       10.0.0.5
smtp_accept_max_nonmail = 20
system_filter = DIR/aux-fixed/TESTNUM.filter
trusted_users = CALLER


# ----- ACL -----

begin acl

check_recipient:
  warn     hosts = 10.0.0.5
           message = authentication-failed: $authentication_failed
  accept   hosts = 10.0.0.5
  accept   hosts = :
  deny     hosts = +auth_hosts
           message = authentication required
          !authenticated = *
  accept   domains = +local_domains
  accept   hosts = +relay_hosts
  accept   hosts = +auth_relay_hosts
           endpass
           message = authentication required
           authenticated = *
  deny     message = relay not permitted

check_etrn:
  deny     hosts = +auth_hosts
           message = authentication required
          !authenticated = *
  require  hosts = 10.0.0.0/24
  warn     log_message = accepted ETRN $smtp_command_argument
  accept

check_expn:
  deny     hosts = +auth_hosts
           message = authentication required
          !authenticated = *
  accept   hosts = 10.0.0.0/24

check_vrfy:
  deny     hosts = +auth_hosts
           message = authentication required
          !authenticated = *
  accept


# ----- Authentication -----

begin authenticators

cram_md5:
  driver = cram_md5
  public_name = CRAM-MD5
  server_debug_print = +++CRAM-MD5 \$auth1="$auth1" \$auth2=\"$auth2" \$auth3="$auth3"
  server_secret = "${if eq{$auth1}{tim}{tanstaaftanstaaf}\
    {${if eq{$auth1}{userx}{secret}fail}}}"
  server_set_id = $auth1
  server_condition = ${if !eq {$sender_host_address}{10.0.0.5}}



# ----- Routers -----

begin routers

fail_remote_domains:
  driver = redirect
  domains = ! +local_domains
  data = :fail: unrouteable mail domain "$domain"

localuser:
  driver = accept
  local_parts = userx
  transport = appendfile


# ----- Transports -----

begin transports

appendfile:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  file = DIR/test-mail/$local_part
  return_path_add
  user = CALLER


# End