[Rspamd-Users] rspamd-3.7.1: lua module clamav is enabled but has not been configured

Franta Hanzlík franta at hanzlici.cz
Mon Oct 23 04:57:05 UTC 2023


Hello everyone,

I'm trying configure rspamd clamav antivirus interface module (until 
now I used clamav-milter + clamd as separate milter on my postfix MTA), 
according to 'https://rspamd.com/doc/modules/antivirus.html'.

My /etc/rspamd/local.d/antivirus.conf is:
  clamav {
    action = "reject";
    message = '${SCANNER}: virus found: "${VIRUS}"';
    scan_mime_parts = true;
    scan_text_mime = false;
    scan_image_mime = false;
    max_size = 20000000;
    symbol = "CLAM_VIRUS";
    type = "clamav";
    log_clean = true;
    prefix = "rs_cl_";
    servers = "/run/clamd.scan/clamd.sock";
    patterns {
      JUST_EICAR = '^Eicar-Test-Signature$';
      CLAM_HEUR_OLE2_VBA_MACRO = "^Heuristics\.OLE2\.ContainsMacros$";
    }
    patterns_fail {
      CLAM_PROTOCOL_ERROR = '^unhandled response';
    }
  }

and clamav is not called, and in /var/log/rspamd/rspamd.log related and 
suspicious are (after rspamd starts) lines:
...
2023-10-23 06:09:17 #938628(main) <6gu15n>; lua; lua_redis.lua:603: use default Redis settings for antivirus
2023-10-23 06:09:17 #938628(main) <6gu15n>; lua; antivirus.lua:209: added antivirus engine clamav -> CLAM_VIRUS
2023-10-23 06:09:17 #938628(main) <6gu15n>; cfg; rspamd_init_lua_filters: init lua module antivirus from /usr/share/rspamd/antivirus.lua; digest: d0f8ebf97e
...
2023-10-23 06:09:17 #938628(main) <6gu15n>; cfg; rspamd_config_is_module_enabled: lua module clamav is enabled but has not been configured
2023-10-23 06:09:17 #938628(main) <6gu15n>; cfg; rspamd_config_is_module_enabled: clamav disabling unconfigured lua module
...
2023-10-23 06:09:17 #938628(main) <6gu15n>; cfg; rspamd_init_lua_filters: init of /usr/share/rspamd/lualib/lua_ffi/spf.lua failed: /usr/share/rspamd/lualib/lua_ffi/spf.lua:71: size of C type is unknown or too large at line 35; trace: [1]:{[C]:-1 - cdef [C]}; [2]:{/usr/share/rspamd/lualib/lua_ffi/spf.lua:71 - <unknown> [main]};
...

(last one is probably unrelated (but some error it perhaps is? ))

Any idea what else needs to be configured for the clamav antivirus 
to work properly?
-- 
Thanks in advance, Franta Hanzlik


More information about the Users mailing list