Howto get notified by rspamd whenever a mail is blocked because of forbidden attachement

Situation: I configured a connector to an external email domain and linked the accounts with the corresponding email accounts on an external mailserver. That works fine, every 5 minutes neth mailserver downloads mails and serves them to the linked local mailaccounts.

As I configured restrictive attachement filtering and block many filetypes, I have the problem that the external mailserver does accept attachements, but rspamd blocks the download as intended while the sender does not get notified of the blocked mails. While I can check and see what mails were blocked in rspamd webinterface, I thought, it would be more convenient, if I could get a mail to a specified emailadress notifying me whenever rspamd blocks an email because of forbidden attachement. Is that possible to configure, and if so - how? Or do you have other ideas ?

Is that not possible? Anyone an idea? Such a mail to the a technician mailbox would avoid the need to manually screen rspamd webinterface for blocked messages.

What about using the quarantine feature?
Another way may be to setup rspamd metadata exporter.

The difficulty is that rspamd rejects the emails because for sure it is porn. You can setup the quarantine but you will have to sort about too much email, all rejected spam will be moved to one account.

1 Like

Well the only recjected mails so far are the ones with forbidden attachements (doc, xls among others), which I configured by requirement. There is almost no spam comming through. Take into account that also our emailprovider has taken actions to prevent spam.

Thanks @mrmarkuz for mentioning two options. We will examine and consider which one fits best for our needs. :slight_smile: