Filtering Attachments properly

seteq

Renowned Member
Dec 15, 2015
21
3
68
39
Hi,

I'd like to use a filter rule to block Word and Powerpoint files even if they are inside archives, but it does not seem to work properly.
Sometimes there are messages which pass PMG and get caught by the forbidden file type rule on the Zimbra mail server.
As far as I understand the ruleset the message should be blocked on PMG.
Is this a malfunction because docx is technically a zip file with different file extension?

Screenshot 2022-06-28 232425.png

Tracking log:

Code:
Jun 28 08:46:36 mx1 pmg-smtp-filter[555024]: E09D962BAA3CC1D671: new mail message-id=<messageid@example.com>#012
Jun 28 08:46:36 mx1 pmg-smtp-filter[555024]: E09D962BAA3CC1D671: found archive 'DME-1.png.docx' (application/zip)
Jun 28 08:46:36 mx1 pmg-smtp-filter[555024]: E09D962BAA3CC1D671: unpack archive 'DME-1.png.docx' done (24 ms)
[...]
Jun 28 08:46:39 mx1 pmg-smtp-filter[555024]: E09D962BAA3CC1D671: accept mail to <recipient@mydomain.com> (44CF1E0AA8) (rule: default-accept)

Can somebody please explain what's happening here?

Thank you :)
 
the problem here is that the mimetype for the docx is probably detected as 'archive' or some sort (docx is a glorified zip with xml inside...)
you could add a 'match archive filename' rule in addition, this matches on filenames in archives
 
  • Like
Reactions: Stoiko Ivanov

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!