How can I enable rar support in Amavis to fix the error: No ext program for .rar, tried: unrar, rar in the maillog?

Install the Rar/Unrar Binaries

AlmaLinux / CloudLinux

Download the latest RAR packages for Linux x64 from rarlab.com. Note: These third party binaries are for x86 only. ARM is not supported. Extract the tar.gz package and copy the rar and unrar binaries to your /usr/local/bin directory:

wget https://www.rarlab.com/rar/rarlinux-x64-722.tar.gz
tar -zxvf rarlinux-x64-722.tar.gz
cd rar
cp rar unrar /usr/local/bin

Debian / Ubuntu

Debian / Ubuntu servers should also edit the file /etc/amavis/conf.d/01-debian and un-comment the non-free version and comment out the unrar-free entry. (The free version only supports older versions of .rar). After you are done the lines should look like this:

$unrar      = ['rar', 'unrar']; #disabled (non-free, no security support)
#$unrar     = ['unrar-free']; 

Restart Amavis

// Centos/RHEL/CloudLinux/AlmaLinux
systemctl restart amavisd

// Debian/Ubuntu
systemctl restart amavis

Important
It is important that you always keep these binaries updated regularly as Rarlab releases new versions as older versions can contain security vulnerabilities.

  • rar, amavis
  • 7 Users Found This Useful
Was this answer helpful?

Related Articles

How can I change the interface language of the extension?

You can change the interface language under Settings -> Application Settings -> Locale...

How can I disable admin email notifications in Amavis?

Amavis has different default options for controlling where virus, spam, banned file attachments,...

How can I whitelist or blacklist a mail server from greylisting?

To Whitelist a Mail Server From Greylisting Navigate to Warden -> Settings ->...

How can I enable third party anti-virus signatures within Warden to improve the ClamAV detection rate?

Warden supports enabling third party anti-virus signatures to improve the detection rate. These...

How can I setup a local caching DNS resolver to speed up DNS queries used by Amavis?

Run the following command to check if local DNS caching is enabled: host -tTXT...