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