On Wed, 28 Mar 2007, Philippe Latu wrote:

Hello,
When trying to release a quarantined mail I get the following error on a 
amavisd-new-2.5.0-pre2 gateway :
# amavisd-release 9/spam-9nf5LMYbGJHR.gz450 4.5.0 ERROR: Stored quarantine ID 
'9nf5LMYbGJHR' does not match requested ID 'spam-9nf5LMYbGJHR' at 
/usr/local/sbin/amavisd line 6891, <GEN143> line 5.
although the file exists and is the one I want to extract :
# ll /var/lib/amavis/virusmails/9/spam-9nf5LMYbGJHR.gz-rw-r----- 1 amavis 
amavis 83K 2007-03-27 23:11 /var/lib/amavis/virusmails/9/spam-9nf5LMYbGJHR.gz
This same mail was sent to (two different addresses | two different gateways) :
. one running amavisd-new-2.4.5 on a Pentium(R) III CPU - S 1400MHz with 2GB 
RAM. There eveything went ok :# amavisd-release I/spam-IsOsxJNyQAZn.gz250 2.6.0 
Ok, id=rel-IsOsxJNyQAZn, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 
F0E0C1DC003
. one running amavisd-new-2.5.0-pre2 on a Pentium III 500 with 384Mo RAMcf. 
error message above
Both have same configuration parameters :$policy_bank{'AM.PDP-SOCK'} = {  protocol 
=> 'AM.PDP',  # Amavis policy delegation protocol  auth_required_release => 0,  
# don't require secret_id for amavisd-release};
$interface_policy{'SOCK'} = 'AM.PDP-SOCK';
Could it be a CPU performance problem as I am using an old clunky machine ?
Should I raise debug level ?
Thanks for your attention.-- - Philippe Latu< G N U / Linux >philippe.latu(at)linux-france.orgProjet 
inetdoc.Linux http://www.linux-france.org/prj/inetdoc</>< I U T 'A'  Paul Sabatier 
>philippe.latu(at)iut-tlse3.fr - 05.62.25.80.28Enseignant/Chargé de mission Systèmes & 
Réseau</>


diff -u amavisd-new-2.4.5/amavisd-release amavisd-new-2.5.0-pre2/amavisd-release
--- amavisd-new-2.4.5/amavisd-release   2006-08-08 11:14:47.000000000 -0700
+++ amavisd-new-2.5.0-pre2/amavisd-release      2007-02-14 05:40:27.000000000 
-0800

-  $mail_file =~ m{^ ([^/].*/)? ([A-Z0-9_-]*)
-                   ([A-Z0-9][A-Z0-9+-]{10}[A-Z0-9]) (\.gz)? \z}xsi
+  $mail_file =~ m{^ ([^/].*/)? ([A-Za-z0-9$._=+-]+?) (\.gz)? \z}xs
     or die "Invalid quarantine file name: $mail_file";
-  my($fn_path,$fn_prefix,$mail_id,$fn_suffix) = ($1,$2,$3,$4);
+  my($fn_path,$mail_id,$fn_suffix) = ($1,$2,$3);

amavisd-release in amavisd 2.5.0-pre2 will put 'spam-9nf5LMYbGJHR' in $mail_id instead of '9nf5LMYbGJHR'.

If you check the sub routine msg_from_quarantine($$) in amavisd, it get qurantine id like this:

-----------
elsif (/^X-Quarantine-ID:[ \t]*(.*)$/i) {
    $qid = $1;   $qid = $1 if $qid =~ /^<(.*)>\z/s;
-----------

The $qid would be '9nf5LMYbGJHR' I think, then

---------
  if ($qid ne $quarantine_id)
    { die "Stored quarantine ID '$qid' does not match ".
          "requested ID '$quarantine_id'" }
--------------

I think if you change amavisd-release in amavisd 2.5.0-pre2 back to

----------
$mail_file =~ m{^ ([^/].*/)? ([A-Z0-9_-]*)
                   ([A-Z0-9][A-Z0-9+-]{10}[A-Z0-9]) (\.gz)? \z}xsi
my($fn_path,$fn_prefix,$mail_id,$fn_suffix) = ($1,$2,$3,$4);
-------------

It should work.


Vincent Li
http://bl0g.blogdns.com
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to