Hi,
im using
Deny Filenames = \.zip$ in the Mailscanner.conf for blocking all zip files.
But is it possible to block all zip files except the files starting with (for example): ITR_*.zip?
Thank you
Zip file Block
- shawniverson
- Posts: 3783
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Zip file Block
That's a tough one.
You don't want to block basically "ITR_*\.zip$", so if you inverse that it with allow everything else (including zips).
So, you will need to use the rulesets instead.
How about this?
/etc/MailScanner/filename.rules.conf (use tabs between not spaces)
You don't want to block basically "ITR_*\.zip$", so if you inverse that it with allow everything else (including zips).
So, you will need to use the rulesets instead.
How about this?
/etc/MailScanner/filename.rules.conf (use tabs between not spaces)
Code: Select all
allow ITR_*\.zip$ Allow zips with ITR Prefix Allow zips with ITR Prefix
#allow \.zip$ - -
deny \.zip$ Deny zips Deny zips
Re: Zip file Block
Hi,
thank you for the answer.
Its now blocking the zip files with the new "Deny zips" message, but when sending it with prefix ITR_Test.zip its also blocked via the "Deny zips" rule.
Is the deny rule "higher" then the allow rule?
Got another idea?
Thank you!
thank you for the answer.
Its now blocking the zip files with the new "Deny zips" message, but when sending it with prefix ITR_Test.zip its also blocked via the "Deny zips" rule.
Is the deny rule "higher" then the allow rule?
Got another idea?

Thank you!
- shawniverson
- Posts: 3783
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Zip file Block
Dang, block overrides allow...
What about this?
What about this?
Code: Select all
deny (?!ITR_)\.zip$ Deny zips Deny zips except for those with ITR prefix
Re: Zip file Block
Hi,
mhm comes up with the new error message "Deny zips except for those with ITR prefix" but it is blocking files like "ITR_523.zip"
Thank you
mhm comes up with the new error message "Deny zips except for those with ITR prefix" but it is blocking files like "ITR_523.zip"
Thank you
- shawniverson
- Posts: 3783
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Zip file Block
Forgot a wildcard...try this....
Code: Select all
deny (?!ITR_).*\.zip$ Deny zips Deny zips except for those with ITR prefix
Re: Zip file Block
Hi,
mhm the same "problem" it blocks all zip files
Thx
mhm the same "problem" it blocks all zip files

Thx
- shawniverson
- Posts: 3783
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Zip file Block
Code: Select all
deny ^(?!ITR_).*\.zip$ Deny zips Deny zips except for those with ITR prefix
Re: Zip file Block
Hi,
thank you very much, this is working
Thank you!
thank you very much, this is working

Thank you!
Re: Zip file Block
Hi,
another question
is it possible to notify the sender AND the receiver that a zip was blocked? Also is there an option to just set *.zip to a score that it gets blocked and could be released via the Link that is sent from EFA3?
Thx
another question

is it possible to notify the sender AND the receiver that a zip was blocked? Also is there an option to just set *.zip to a score that it gets blocked and could be released via the Link that is sent from EFA3?
Thx