summaryrefslogtreecommitdiff
path: root/test/confs/3400
blob: 8496e435b9c6e687dbefc6bd07fc61c9b1a285e8 (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# Exim test configuration 3400

exim_path = EXIM_PATH
keep_environment =
host_lookup_order = bydns
primary_hostname = myhost.test.ex
spool_directory = DIR/spool
log_file_path = DIR/spool/log/%slog
gecos_pattern = ""
gecos_name = CALLER_NAME
tls_advertise_hosts =

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

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

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

acl_smtp_connect = check_connect
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_connect:
  warn     hosts = 10.0.0.6
           control = allow_auth_unadvertised
  accept

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

mylogin:
  driver = plaintext
  public_name = mylogin
  server_debug_print = +++MYLOGIN \$1="$1" \$2=\"$2" \$3="$3"
  server_condition = "\
    ${if match{$1}{^(\\\\S+)\\\\s+(\\\\S+)\\$}\
    {${if and {{eq{$1}{userx}}{eq{$2}{secret}}}{yes}{no}}}{no}}"

plain:
  driver = plaintext
  public_name = PLAIN
  server_condition = "\
    ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
  server_set_id = $auth2

extended_plain:
  driver = plaintext
  public_name = EXPLAIN
  server_prompts = :
  server_condition = "\
    ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
  server_set_id = $auth2

expanded_prompt_plain:
  driver = plaintext
  public_name = EXPANDED
  server_prompts = $primary_hostname
  server_condition = "\
    ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
  server_set_id = $auth2

expanded_prompt_plain_fail:
  driver = plaintext
  public_name = EXPANDFAIL
  server_prompts = $nonexistent
  server_condition = "\
    ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
  server_set_id = $auth2

defer:
  driver = plaintext
  public_name = DEFER
  server_condition = "account suspended"
  server_set_id = $auth2

login:
  driver = plaintext
  public_name = LOGIN
  server_prompts = "User Name : Password "
  server_condition = "\
    ${if and {{eq{$auth1}{userx}}{eq{$auth2}{secret}}}{yes}{no}}"
  server_set_id = $auth1


# ----- 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