Hello,

I have the following rule in my amavis config to block undecipherable 
archives:

# # block if any component can not be decoded (is encrypted or bad archive)
qr'(?# BLOCK IF UNDECIPHERABLE ) ^ (.*\t)? A=U (\t.*)? \z'xmi,

But when I send a corrupt test zip archive (if you want the attachment, 
please email me) through amavis, it is not blocked. I created the corrupt 
test zip archive by taking a valid zip file, opening it in notepad and 
deleting a couple of lines. When I open the resulting zip in winzip I get an 
error that the zip file is corrupt.

Amavis logs the following debug lines (it gives an io error when 
decompressing the zip):

Jun  7 15:27:45 /opt/csw/sbin/amavisd-new[28550]: (28550-01) File-type of 
p002: ZIP archive; (zip)
Jun  7 15:27:45 /opt/csw/sbin/amavisd-new[28550]: (28550-01) do_ascii: 
Decoding part p001
Jun  7 15:27:45 /opt/csw/sbin/amavisd-new[28550]: (28550-01) do_ascii: 
Decoding part p001 (0 items), uulib V0.5pl20
Jun  7 15:27:45 /opt/csw/sbin/amavisd-new[28550]: (28550-01) decompose_part: 
p001 - atomic
Jun  7 15:27:45 /opt/csw/sbin/amavisd-new[28550]: (28550-01) Unzipping p002
Jun  7 15:27:45 /opt/csw/sbin/amavisd-new[28550]: (28550-01) do_unzip: not a 
zip: AZ_IO_ERROR (4)
Jun  7 15:27:45 /opt/csw/sbin/amavisd-new[28550]: (28550-01) decompose_part: 
p002 - atomic

So my question is how amavis determines if a file is undecipherable? And why 
was the corrupt zip file not blocked?

I have also tested with an encrypted zip and in that case the file is 
blocked (amavis determines the file is encrypted and undecipherable).

Thanks,
Jan Vergeer




_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to