<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<blockquote type="cite"
cite="mid:CAHXu+W7UrkY202GNfKYwP_HaKF3VRQSJc9rnNr-xyG1pDzr9Lg@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">For example, say .rar isn't supported natively. I've seen tutorials suggest
installing related packages, but don't see how Amavis picks up on that.
>From the amavsid.conf, I see a "@decoders" which seems like a map
(extension, command, arguments). This appears to map to
/lib/Amavis/Unpackers.pm.
- What's the process for ensuring certain extensions get scanned?</pre>
</blockquote>
<p>At startup, Amavis will log something like this:</p>
<p>
<blockquote type="cite">Found decoder for .Z at
/usr/bin/uncompress<br>
Found decoder for .gz at /usr/bin/gzip -d<br>
Internal decoder for .gz (backup, not used)<br>
Found decoder for .bz2 at /usr/bin/bzip2 -d<br>
Found decoder for .xz at /usr/bin/xz -dc<br>
Found decoder for .lzma at /usr/bin/xz -dc --format=lzma<br>
...<br>
</blockquote>
<br>
</p>
<blockquote type="cite"
cite="mid:CAHXu+W7UrkY202GNfKYwP_HaKF3VRQSJc9rnNr-xyG1pDzr9Lg@mail.gmail.com">
<pre class="moz-quote-pre" wrap=""> - How do I know which extensions are supported?</pre>
</blockquote>
<span style="white-space: pre-wrap">
</span>
<pre class="moz-quote-pre" wrap=""><span style="white-space: normal">The second "column" of @decoders, which you referred to as command, specifies Perl subroutines that know how to call external programs and how to interpret their output.
The third column is a search list of external programs that can handle the extensions in the first column. </span></pre>
<p></p>
<p>So if an external unpacker like 7z started to support a new
archive extension without changing its CLI for unpacking, one
should be able to add this new extension to the first column of
the appropriate @decoders row. However, if there were a new
unpacker that has a new type of CLI, someone would have to write
an unpackers routine and reference it in the second column.<br>
</p>
</body>
</html>