Page 1 of 1
Zip file Block
Posted: 08 Feb 2016 15:52
by itr
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
Re: Zip file Block
Posted: 08 Feb 2016 23:35
by shawniverson
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)
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
Posted: 09 Feb 2016 06:52
by itr
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!
Re: Zip file Block
Posted: 10 Feb 2016 22:40
by shawniverson
Dang, block overrides allow...
What about this?
Code: Select all
deny (?!ITR_)\.zip$ Deny zips Deny zips except for those with ITR prefix
Re: Zip file Block
Posted: 15 Feb 2016 20:14
by itr
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
Re: Zip file Block
Posted: 15 Feb 2016 22:10
by shawniverson
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
Posted: 16 Feb 2016 10:22
by itr
Hi,
mhm the same "problem" it blocks all zip files
Thx
Re: Zip file Block
Posted: 16 Feb 2016 11:14
by shawniverson
Code: Select all
deny ^(?!ITR_).*\.zip$ Deny zips Deny zips except for those with ITR prefix
Re: Zip file Block
Posted: 16 Feb 2016 17:00
by itr
Hi,
thank you very much, this is working
Thank you!
Re: Zip file Block
Posted: 25 Feb 2016 11:15
by itr
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