[Rspamd-Users] Block emails with .doc, .xls attachments with Rspamd

Florian Effenberger florian at effenberger.org
Mon Apr 15 12:45:02 UTC 2024


Hi,

Andreas wrote on 15.04.24 at 14:24:

> I have a question about blocking emails with file attachments. I saw that there
> is mime_types.conf in /etc/rspamd/local.d which already contains file
> extensions like exe, jar.

I think it should work with the following in local.d/multimap.conf:

FILENAME_BLACKLISTED {
  type = "filename";
  filter = "extension";
  map = "$CONFDIR/local.d/filename.map";
  action = "reject";
  message = "A restricted file type was found";
  skip_archives = true;
}

filename.map itself only contains the suffix of the files to be blocked, 
e.g.

vbs
dll
exe
com

Florian


More information about the Users mailing list