Patrick Ben Koetter <p...@sys4.de> писал(а) в своём письме Wed, 07 Aug 2019 23:36:17 +0300:

* korsar...@gmail.com <korsar...@gmail.com>:
Patrick Ben Koetter <p...@sys4.de> писал(а) в своём письме Wed, 07 Aug 2019
21:56:09 +0300:

> * korsar...@gmail.com <korsar...@gmail.com>:
> > Patrick Ben Koetter <p...@sys4.de> писал(а) в своём письме Wed, 07 Aug 2019
> > 20:55:57 +0300:
> >
> > > * korsar...@gmail.com <korsar...@gmail.com>:
> > > > I'm using latest amavis 2.11.0 on Debian 10 and it doesn't unpack
> > > > any rar.
> > > > With unrar-nonfree 5.6.6-1 mail passes unchecked, with 7z it passes
> > > > clean.
> > > > What I do wrong?
> > >
> > > Which RAR version is the archive?
> > >
> >
> > rar 4
>
> The rar unpackers on Debian *should* be able to unpack RAR version 4
> archives.
> Did you try to unpack it manually – outside of amavis?
>
> p@rick
>
> P.S.
> Please do not reply offlist. The support is a community effort and it
> should
> stay onlist so everbody can add knowledge or receive some. Thanks.
>
Sorry for offlist reply - misclick.

:-)

Unpacking manually working fine, but amavis marks it like Passed UNCHECKED,
no idea why. unrar-nonfree version 5.6.6-2.

If I'll try unar or 7z I should modify amavis source code to fix wrong
options -idcdp?

Copy the @decoders section from the amavisd-new binary and modify the command
that should be used to unpack rar.

p@rick



You mean  this section?

sub do_unrar($$$;$) {
  my($part, $tempdir, $archiver, $testing_for_sfx) = @_;
  ll(4) && do_log(4, "Expanding RAR archive %s", $part->base_name);
  my($decompressor_name) = basename((split(' ',$archiver))[0]);
  snmp_count("OpsDecBy\u${decompressor_name}Attempt");
  # unrar exit codes: SUCCESS=0, WARNING=1, FATAL_ERROR=2, CRC_ERROR=3,
# LOCK_ERROR=4, WRITE_ERROR=5, OPEN_ERROR=6, USER_ERROR=7, MEMORY_ERROR=8,
  #   CREATE_ERROR=9, USER_BREAK=255
  my(@list); my($hypcount) = 0; my($encryptedcount) = 0;
  my($lcnt) = 0; my($member_name); my($bytes) = 0; my($last_line);
  my($item_num) = 0; my($parent_placement) = $part->mime_placement;
  my($retval) = 1; my($fn) = $part->full_name; my($proc_fh,$pid);
  my(@common_rar_switches) = qw(-c- -p- -idcdp);  # -av-

I've removed "-c- -p- -idcdp" for unar, but this doesn't work. It says do_unrar: can't get a list of archive members: exit 1; v: Couldn't open archive. (Opening file failed.)

Reply via email to