1

Topic: Amavis quarantine, release email with amavisd-release

Hi,

I have installed a mail server with iRedMail and I activated quarantine in amavis for email with virus, banned file and bad header.

I made test and quarantine is working well but when I tried to release an email with "amavisd-release" command, I have the following error:

# amavisd-release BWEgBXUllkJU hEjnKQkKI89O
450 4.5.0 Failure: File /var/lib/amavis/virusmails/BWEgBXUllkJU does not exist at (eval 95) line 386, <GEN34> line 5.

It seems that amavisd-release search quarantined email in files instead in SQL databases.

How can I have the command have the command "amavisd-release" working with iRedMail configurations?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache 2.4
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Amavis quarantine, release email with amavisd-release

Seems "amavisd-release" doesn't read setting in Amavisd config file to understand where the quarantined mails are stored. In this case, you need to write a simple script to release email with command like 'telnet or other tools.

Check its doc below, you need "quar_type=Q" to tell Amavisd to release email from SQL db, not from local file system:
https://amavis.org/README.protocol.txt

BTW, with iRedAdmin-Pro, just few clicks. Besides, you can view mail headers and mail body of quarantined emails. smile

3

Re: Amavis quarantine, release email with amavisd-release

ZhangHuangbin wrote:

Seems "amavisd-release" doesn't read setting in Amavisd config file to understand where the quarantined mails are stored. In this case, you need to write a simple script to release email with command like 'telnet or other tools.

Check its doc below, you need "quar_type=Q" to tell Amavisd to release email from SQL db, not from local file system:
https://amavis.org/README.protocol.txt

BTW, with iRedAdmin-Pro, just few clicks. Besides, you can view mail headers and mail body of quarantined emails. smile

The reason is there is an error in amavisd-release. There is no "quar_type='Q'" in the script.

I created a new file "amavisd-release-sql" and changed the line following line:
  my $quar_type = $fn_suffix eq '.gz' ? 'Z' : $fn_path ne '' ? 'F' : ' ';

The new line is
  my $quar_type = $fn_suffix eq '.gz' ? 'Z' : $fn_path ne '' ? 'F' : 'Q';

Now it's working fine.