amavis-user March 2012 archive
Main Archive Page > Month Archives  > amavis-user archives
amavis-user: How to use amavisd-release with an SQL quarantine?

How to use amavisd-release with an SQL quarantine?

From: Steve <steeeeeveee_at_nospam>
Date: Tue Mar 13 2012 - 09:35:41 GMT

Hello list,

I am lost. How do I use amavisd-release to release a quarantined message from an SQL quarantine. The message I would like to release has generated this error (I masked some values to protect the innocent):

A virus was found: PUA.OLE.EmbeddedPDF

Scanner detecting a virus: ClamAV-clamd

Content type: Virus
Internal reference code for the message is 10632-05/CyzWZJfWJryw

First upstream SMTP client IP address: []
According to a 'Received:' trace, the message apparently originated at:
  [aaa.bbb.ccc.dd], [aaa.bbb.ccc.dd]

Return-Path: <>
From: "Lastname,Firstname,CITY,Department"
Message-ID: <>
Subject: WG: Vanilloccino
The message has been quarantined as: CyzWZJfWJryw[111]

The message WAS NOT relayed to:
   250 2.7.0 Ok, discarded, id=10632-05 - INFECTED: PUA.OLE.EmbeddedPDF

Virus scanner output:
  p008: PUA.OLE.EmbeddedPDF FOUND
  p004: PUA.OLE.EmbeddedPDF FOUND

The documentation says that amavisd-release is using the following syntax:
amavisd-release mail_file [secret_id [alt_recip1 alt_recip2 ...]]

So what is my mail_file and what is my secret_id?

I see in the quarantine table that I have a mail_id:

mysql> describe quarantine;
| Field | Type | Null | Key | Default | Extra |
| mail_id | varbinary(12) | NO | PRI | | |
| chunk_ind | int(10) unsigned | NO | PRI | NULL | |
| mail_text | blob | NO | | NULL | |
| partition_tag | int(11) | NO | PRI | 0 | |
4 rows in set (0.00 sec)


That mail_id is not constant and changes from record to record. Some records however share the same mail_id.

I have no clue how to extract the mail_id/secret_id from the notification I receive from Amavisd-New. Can anyone help me or point me into the proper direction?

// Steve
-- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro!