How can I block .zip and .rar files that contain only .exe files?

aynur.yilmaz

New Member
Dec 17, 2021
13
0
1
29
Hello,

I want to know a way to block .zip and .rar files containing only .exe files through Proxmox Mail Gateway.

Allow .zip and .rar files that do not contain .exe files.

Thanks. Best regards.
 
create an 'Archive Filter' object to match exe files - and a fitting rule to block this 'What Object'

I hope this helps
 
* create what object:
* GUI->Mail Filter->What Objects->Create (create a new object and name it "zipped exe"
* select the object the 'Add->Archive Filter' and select 'application/x-ms-dos-executable (exe)'

* create a rule (chose the priority fittingly)
* GUI->Mail Filter->'Add'
* What Object "zipped exe"
* Action Object "Block"

I hope this helps
 
* create what object:
* GUI->Mail Filter->What Objects->Create (create a new object and name it "zipped exe"
* select the object the 'Add->Archive Filter' and select 'application/x-ms-dos-executable (exe)'

* create a rule (chose the priority fittingly)
* GUI->Mail Filter->'Add'
* What Object "zipped exe"
* Action Object "Block"

I hope this helps

hi stoiko,
i have done your steps, but proxmox didnt recognize the .exe file as a application/x-ms-dos-executable file in that archive. Whats the problem?

Mar 25 10:05:24 mx2 pmg-smtp-filter[58295]: 281510623D85D46B66B: found archive 'write-1.rar' (application/vnd.rar)
Mar 25 10:05:24 mx2 pmg-smtp-filter[58295]: 281510623D85D46B66B: unpack failed - child '58439' failed: 512
Mar 25 10:05:24 mx2 pmg-smtp-filter[58295]: 281510623D85D46B66B: unpack archive 'write-1.rar' done (22 ms)

Mar 25 10:15:55 mx2 pmg-smtp-filter[58470]: 281510623D884AA2E2D: found archive 'appidtel-1.zip' (application/zip)
Mar 25 10:15:55 mx2 pmg-smtp-filter[58470]: 281510623D884AA2E2D: unpack archive 'appidtel-1.zip' done (21 ms)
Mar 25 10:15:56 mx2 pmg-smtp-filter[58470]: 281510623D884AA2E2D: block mail to <xxxxxx@xxxxxx.de> (rule: Block Zipped EXE)

Zip-Files are ok!

Best regards.

Cyprian
 
Last edited:
hi stoiko,
i have done your steps, but proxmox didnt recognize the .exe file as a application/x-ms-dos-executable file in that archive. Whats the problem?

Mar 25 10:05:24 mx2 pmg-smtp-filter[58295]: 281510623D85D46B66B: found archive 'write-1.rar' (application/vnd.rar)
Mar 25 10:05:24 mx2 pmg-smtp-filter[58295]: 281510623D85D46B66B: unpack failed - child '58439' failed: 512
Mar 25 10:05:24 mx2 pmg-smtp-filter[58295]: 281510623D85D46B66B: unpack archive 'write-1.rar' done (22 ms)
on a hunch (without reproducing this) - did you install the necessary packages from the non-free section for rar-support:
see 3.5.6 at:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmg_package_repositories
 
  • Like
Reactions: cyprian1981

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!