40_exim4-config_check_data 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ### acl/40_exim4-config_check_data
  2. #################################
  3. # This ACL is used after the contents of a message have been received. This
  4. # is the ACL in which you can test a message's headers or body, and in
  5. # particular, this is where you can invoke external virus or spam scanners.
  6. acl_check_data:
  7. # Deny unless the address list headers are syntactically correct.
  8. #
  9. # If you enable this, you might reject legitimate mail.
  10. .ifdef CHECK_DATA_VERIFY_HEADER_SYNTAX
  11. deny
  12. message = Message headers fail syntax check
  13. !acl = acl_local_deny_exceptions
  14. !verify = header_syntax
  15. .endif
  16. # require that there is a verifiable sender address in at least
  17. # one of the "Sender:", "Reply-To:", or "From:" header lines.
  18. .ifdef CHECK_DATA_VERIFY_HEADER_SENDER
  19. deny
  20. message = No verifiable sender address in message headers
  21. !acl = acl_local_deny_exceptions
  22. !verify = header_sender
  23. .endif
  24. # Deny if the message contains malware. Before enabling this check, you
  25. # must install a virus scanner and set the av_scanner option in the
  26. # main configuration.
  27. #
  28. # exim4-daemon-heavy must be used for this section to work.
  29. #
  30. # deny
  31. # malware = *
  32. # message = This message was detected as possible malware ($malware_name).
  33. # Add headers to a message if it is judged to be spam. Before enabling this,
  34. # you must install SpamAssassin. You also need to set the spamd_address
  35. # option in the main configuration.
  36. #
  37. # exim4-daemon-heavy must be used for this section to work.
  38. #
  39. # Please note that this is only suiteable as an example. There are
  40. # multiple issues with this configuration method. For example, if you go
  41. # this way, you'll give your spamassassin daemon write access to the
  42. # entire exim spool which might be a security issue in case of a
  43. # spamassassin exploit.
  44. #
  45. # See the exim docs and the exim wiki for more suitable examples.
  46. #
  47. # warn
  48. # spam = Debian-exim:true
  49. # add_header = X-Spam_score: $spam_score\n\
  50. # X-Spam_score_int: $spam_score_int\n\
  51. # X-Spam_bar: $spam_bar\n\
  52. # X-Spam_report: $spam_report
  53. # This hook allows you to hook in your own ACLs without having to
  54. # modify this file. If you do it like we suggest, you'll end up with
  55. # a small performance penalty since there is an additional file being
  56. # accessed. This doesn't happen if you leave the macro unset.
  57. .ifdef CHECK_DATA_LOCAL_ACL_FILE
  58. .include CHECK_DATA_LOCAL_ACL_FILE
  59. .endif
  60. # accept otherwise
  61. accept