You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

antivirus.conf 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Please don't modify this file as your changes might be overwritten with
  2. # the next update.
  3. #
  4. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
  5. # parameters defined on the top level
  6. #
  7. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
  8. # parameters defined on the top level
  9. #
  10. # For specific modules or configuration you can also modify
  11. # '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
  12. # '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
  13. #
  14. # See https://rspamd.com/doc/tutorials/writing_rules.html for details
  15. antivirus {
  16. # multiple scanners could be checked, for each we create a configuration block with an arbitrary name
  17. clamav {
  18. # If set force this action if any virus is found (default unset: no action is forced)
  19. # action = "reject";
  20. # message = '${SCANNER}: virus found: "${VIRUS}"';
  21. # Scan mime_parts seperately - otherwise the complete mail will be transfered to AV Scanner
  22. #scan_mime_parts = true;
  23. # Scanning Text is suitable for some av scanner databases (e.g. Sanesecurity)
  24. #scan_text_mime = false;
  25. #scan_image_mime = false;
  26. # If `max_size` is set, messages > n bytes in size are not scanned
  27. #max_size = 20000000;
  28. # symbol to add (add it to metric if you want non-zero weight)
  29. symbol = "CLAM_VIRUS";
  30. # type of scanner: "clamav", "fprot", "sophos" or "savapi"
  31. type = "clamav";
  32. # For "savapi" you must also specify the following variable
  33. #product_id = 12345;
  34. # You can enable logging for clean messages
  35. #log_clean = true;
  36. # servers to query (if port is unspecified, scanner-specific default is used)
  37. # can be specified multiple times to pool servers
  38. # can be set to a path to a unix socket
  39. # Enable this in local.d/antivirus.conf
  40. #servers = "127.0.0.1:3310";
  41. # if `patterns` is specified virus name will be matched against provided regexes and the related
  42. # symbol will be yielded if a match is found. If no match is found, default symbol is yielded.
  43. patterns {
  44. # symbol_name = "pattern";
  45. JUST_EICAR = '^Eicar-Test-Signature$';
  46. }
  47. patterns_fail {
  48. # symbol_name = "pattern";
  49. #CLAM_PROTOCOL_ERROR = '^unhandled response';
  50. }
  51. # `whitelist` points to a map of IP addresses. Mail from these addresses is not scanned.
  52. whitelist = "/etc/rspamd/antivirus.wl";
  53. }
  54. .include(try=true,priority=5) "${DBDIR}/dynamic/antivirus.conf"
  55. .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/antivirus.conf"
  56. .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/antivirus.conf"
  57. }