| 1 | # Exim test configuration 0021 |
| 2 | |
| 3 | SERVER= |
| 4 | BR= |
| 5 | |
| 6 | exim_path = EXIM_PATH |
| 7 | host_lookup_order = bydns |
| 8 | primary_hostname = myhost.test.ex |
| 9 | rfc1413_query_timeout = 0s |
| 10 | spool_directory = DIR/spool |
| 11 | log_file_path = DIR/spool/log/SERVER%slog |
| 12 | gecos_pattern = "" |
| 13 | gecos_name = CALLER_NAME |
| 14 | |
| 15 | # ----- Main settings ----- |
| 16 | |
| 17 | addresslist ok_senders = ok@somewhere : ok@test1 : ok@test3 |
| 18 | domainlist ok_sender_domains = somewhere : test1 : test3 |
| 19 | |
| 20 | acl_not_smtp = not_smtp_${if eq{$sender_address}{}\ |
| 21 | {test1}{${domain:$sender_address}}} |
| 22 | |
| 23 | acl_smtp_connect = connect |
| 24 | acl_smtp_helo = helo |
| 25 | acl_smtp_mail = mail |
| 26 | acl_smtp_rcpt = rcpt |
| 27 | |
| 28 | BR |
| 29 | |
| 30 | qualify_domain = test.ex |
| 31 | trusted_users = CALLER |
| 32 | |
| 33 | |
| 34 | # ----- ACLs ----- |
| 35 | |
| 36 | begin acl |
| 37 | |
| 38 | not_smtp_test1: |
| 39 | accept senders = : ok@test1 |
| 40 | verify = sender |
| 41 | deny message = don't like sender $sender_address |
| 42 | |
| 43 | not_smtp_test2: |
| 44 | accept hosts = 1.2.3.4 |
| 45 | |
| 46 | not_smtp_test3: |
| 47 | accept verify = reverse_host_lookup |
| 48 | |
| 49 | not_smtp_test4: |
| 50 | accept verify = certificate |
| 51 | |
| 52 | connect: |
| 53 | deny hosts = : 10.9.8.7 |
| 54 | drop log_message = forcibly dropped |
| 55 | hosts = 10.9.8.9 |
| 56 | accept logwrite = $sender_host_address accepted by connect ACL |
| 57 | |
| 58 | helo: |
| 59 | warn message = xxx: can't add this header |
| 60 | log_message = This warning is from a HELO ACL (command $smtp_command) |
| 61 | accept condition = ${if eq{$smtp_command_argument}{a.b.c}{yes}{no}} |
| 62 | |
| 63 | mail: |
| 64 | warn message = added header line |
| 65 | senders = ok@test3 |
| 66 | accept senders = ok@test1 : ok@test3 |
| 67 | verify = sender |
| 68 | logwrite = :main,reject: mail accepted "$smtp_command" "$smtp_command_argument" |
| 69 | |
| 70 | rcpt: |
| 71 | accept senders = +ok_senders |
| 72 | sender_domains = +ok_sender_domains |
| 73 | logwrite = :panic: rcpt accepted |
| 74 | |
| 75 | # ----- Routers ----- |
| 76 | |
| 77 | begin routers |
| 78 | |
| 79 | accept: |
| 80 | driver = accept |
| 81 | local_parts = !bad |
| 82 | transport = appendfile |
| 83 | |
| 84 | # ----- Transports ----- |
| 85 | |
| 86 | begin transports |
| 87 | |
| 88 | appendfile: |
| 89 | driver = appendfile |
| 90 | file = DIR/test-mail/$local_part |
| 91 | user = CALLER |
| 92 | |
| 93 | # End |