summaryrefslogtreecommitdiff
path: root/test/confs/0021
blob: cb057386eaed0306ec8a0f1f553c91cc88e313a6 (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
# Exim test configuration 0021

SERVER=
BR=
LOG_SELECTOR=

.include DIR/aux-var/std_conf_prefix

primary_hostname = myhost.test.ex

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

addresslist ok_senders = ok@somewhere : ok@test1 : ok@test3
domainlist ok_sender_domains = somewhere : test1 : test3

acl_not_smtp = not_smtp_${if eq{$sender_address}{}\
  {test1}{${domain:$sender_address}}}

acl_smtp_connect = connect
acl_smtp_helo = helo
acl_smtp_mail = mail
acl_smtp_rcpt = rcpt

BR
log_selector = LOG_SELECTOR

qualify_domain = test.ex
trusted_users = CALLER


# ----- ACLs -----

begin acl

not_smtp_test1:
  accept senders = : ok@test1
         verify = sender
  deny   message = don't like sender $sender_address

not_smtp_test2:
  accept hosts = 1.2.3.4

not_smtp_test3:
  accept verify = reverse_host_lookup

not_smtp_test4:
  accept verify = certificate

connect:
  deny   hosts =  : 10.9.8.7
  drop   log_message = forcibly dropped
         hosts = 10.9.8.9
  accept logwrite = $sender_host_address accepted by connect ACL

helo:
  warn   message = xxx: can't add this header
         log_message = This warning is from a HELO ACL (command $smtp_command)
  accept condition = ${if eq{$smtp_command_argument}{a.b.c}{yes}{no}}

mail:
  warn   message = added header line
         senders = ok@test3
  accept senders = ok@test1 : ok@test3
         verify  = sender
         logwrite = :main,reject: mail accepted "$smtp_command" "$smtp_command_argument"

rcpt:
  accept senders = +ok_senders
         sender_domains = +ok_sender_domains
         logwrite = :panic: rcpt accepted C=$smtp_command_history

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

begin routers

accept:
  driver = accept
  local_parts = !bad
  transport = appendfile

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

begin transports

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

# End