[Rspamd-Users] Accepting only certain attachment types for one email address

Ralf Hildebrandt Ralf.Hildebrandt at charite.de
Wed Jan 19 14:22:10 UTC 2022


Hi!

I have an email adress, which should only receive PDF, plain text and
maybe HTML -- nothing else.

How do I combine these two restrictions using multimap? My initial
draft is:

ALLOW_TYPE_TO_ZR {
  type = "combined";
  prefilter = true;
  action = "accept";
  rules {
     type {
        map = "${LOCAL_CONFDIR}/local.d/zr_extensions.map";
        selector = "files:???";
     }
     rcpt = {
        map = "${LOCAL_CONFDIR}/local.d/zr_address.map";
        selector = "rcpts:domain";
     }
  }
  expression = "type & rcpt"
}

zr_extensions.map contains the allowed extensions, while
zr_address.map contains the recipient address.

My problem is the selector for the attachment type... ("files:???")


Ralf Hildebrandt
Charité - Universitätsmedizin Berlin
Geschäftsbereich IT | Abteilung Netzwerk

Campus Benjamin Franklin (CBF)
Haus I | 1. OG | Raum 105
Hindenburgdamm 30 | D-12203 Berlin

Tel. +49 30 450 570 155
ralf.hildebrandt at charite.de
https://www.charite.de


More information about the Users mailing list