Attachment whitelisting

kottyit

New Member
Apr 25, 2025
2
0
1
Hi Proxmox Community,

i would like to switch to proxmox mailgateway because i like the product very much. But before I can use it productively, I need to test some scenarios that are possible with my current product.

We would like to block any attachment that is not explicitly allowed in Proxmox Mailgateway.

I have therefore created two “What-Objects” groups (any matches).

The first group "Allowed_mime_types" is the allowed attachments. There I have created defined content type filters + archive filter (i tested it with only content type-filters - didnt work either). (e.g. content-type=text/plain, image/jpeg, etc.)

The second group "block_all_mime_types" consists of the not allowed attachments. There I have created all content type filters + archive filter that I can define with a * (application/*, audio/* etc.)
This should block all undefined attachments?

Now I have created two rules. The first rule has a higher priority in which the following is configured:

Action Objects -> Accept -> What-Objects – any matches - Allowed_mime_types

Then I created a second rule which has a lower priority.

Action Objects -> Quarantine -> What-Objects - any matches - block_all_mime_types

I then wrote several test e-mails. But they are all let through by the rule “Allowed_mime_types”.

As an example, I have written an e-mail with an audio file. On the Proxmox server, the file is displayed with the file command as “audio/mpeg”. Only “audio/x-wav” is present in the allowed mime_types_group. Otherwise nothing with audio.

The e-mail should actually be blocked due to the second group. It contains “audio/*” as the content type.

However, I can see in the log that the first group rule applies. I cannot explain this.

Am I doing something wrong here or have I made a mistake?
as anyone else ever had this problem?

Thanks so far!

Kotty
 

Attachments