match filename inverted / reverse regex

Feb 15, 2023
3
0
1
Hi,
i use the following regex under match filename filter:

*\.(?!PDF|JPG|JPEG|BMP|PNG)

This works good. So every attachment which is no a pdf, jpg, jpeg, bmp, png will be blocked.

But, if the file name has more than one dot, a PDF will also be blocked.
Example:
annex1.pdf will not be blocked but annex2.2022.pdf will be blocked.

I have already tried super many variants but everything I try does not work. Does anyone here have any ideas?
 
One workaround that should work - is doing the matching with 2 rules:
* one with higher priority and pdf/jpg/... (the attachments you want to allow) - with action accept
* one with lower priority with action remove attachment/attachment quarantine...

I hope this helps!
 
  • Like
Reactions: Moayad