Jan,

> I have created a .gz file which contained a .pl file. E.g. test.gz
> containing the file: help.pl
> When it is scanned by amavis the wrong name is displayed. As you can see
> below it displays "N=test" (at the end of the line) where it should display
> "N=help.pl" This looks to me like a bug to me.
>
> Output from amavisd-new in debug mode:
> lookup_re("P=p003\tL=1\tM=multipart/mixed\nP=p002\tL=1/2\tM=application/x-g
>zip\tT=gz\tN=test.gz\nP=p004\tL=1/2/1\tT=exe\tN=test") matches key

Not a bug.

There are two decoders for gzip available in the @decoders list:
  ['gz', \&do_gunzip],
  ['gz', \&do_uncompress, 'gzip -d'],

The do_gunzip uses perl module Compress::Zlib to decompress gzip
files. This module is unable to provide the original file which
GNU gzip stashes in a compressed file, so after decompresssing
a file test.gz you end up with a file test, just like you would
when doing it on a command line. So you may call it is a deficiency
or this decoder, although it is not wrong what it does.

The do_uncompress module runs an external program gzip, and
uses a trick to parse original file name from what the file(1)
utility reports, so it usually is able to find the original
file name if present in the compressed file.

You can swap the order of both 'gz' entries in the @decoders list,
or just disable the ['gz',\&do_gunzip] entry.

  Mark


_______________________________________________
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