[Rspamd-Users] Finetune MIME_BAD_EXTENSION : reject message
Carsten Rosenberg
cr at ncxs.de
Tue Mar 2 18:05:55 UTC 2021
On 02.03.21 18:36, Sandy Drobic wrote:
>
> Nope, it doesn't seem to work. It merely shows up as raw text in the reject
> message.
>
> said: 554 5.7.1 attachment type ${FILE_EXTENSION_BLACKLISTED} not allowed
> (in reply to end of DATA command)
>
> Am 02.03.2021 um 16:47 schrieb Nihad @ RSPAMD maillist via Users:
>> Without having this tested, but I’ve read elsewhere in the manual that messages can contain "selectors" enclosed in ${}.
>> So perhaps you can try, ${FILE_EXTENSION_BLACKLISTED} in a message, and see if it displays extension.
>>
>> /Nihad
>> On 2 Mar 2021, 10.54 +0100, User questions <users at lists.rspamd.com>, wrote:
>>> *FILE_EXTENSION_BLACKLISTED* (0) [cmd]
>>>
>>> Is it possible to extend the message to include this Symbol?
>>> In this testcase I only sent a message with a single attachment, but if an
>>> Archive with many files is sent it is a bit cumbersome to guess which file has
>>> triggered the reject without a hint.
You have to use force_actions to add a message with selectors.
Maybe give this a try (untested):
REJECT_MIME_BAD {
action = "reject";
expression = "FILE_EXTENSION_BLACKLISTED";
# message can contain selector expressions enclosed in ${}
message = "attachment type ${symbol('FILE_EXTENSION_BLACKLISTED',
'options')} not allowed";
}
https://rspamd.com/doc/modules/force_actions.html
--
Carsten
More information about the Users
mailing list