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

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!