7z archives with encrypted content

Markus Benning ich at markusbenning.de
Tue Dec 2 13:36:44 CET 2014


amavis currently fails to handle 7z files with encrypted content.

To reproduce create a 7z file with encrypted content:

$ 7z a -ppass enc.7z /etc/hosts

This will result in amavisd logging the following error:

Dec  2 10:14:41 xxxxxxx amavis[16806]: (16806-01) (!!)collect_results from
[21779] (/usr/bin/7za): exit 2
\n7-Zip (A) [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov
2010-11-18\np7zip Version 9.20 (locale=en_U
S.UTF-8,Utf16=on,HugeFiles=on,1 CPU)\n\nProcessing archive:
40-16806-dAeC3ffA/parts/p002\n\nExtracting  xxxxxxxxx\n\nEnter
password (will not be echoed) :Extr
acting  issue     Data Error in encrypted file. Wrong password?\n\nSub
items Errors: 1\n\n

Attached is a first attempt to make do_7zip() only extract unencrypted

I still see 2 weak points in the patch:

 * make sure quoting is right for 7z
 * the file list may be to big for @ARGV

-------------- next part --------------
A non-text attachment was scrubbed...
Name: amavis-7z-encrypted.patch
Type: text/x-diff
Size: 2931 bytes
Desc: not available
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20141202/35d13458/attachment.patch>

More information about the amavis-users mailing list