List Info

Thread: weird behaviour on amavisd-release




weird behaviour on amavisd-release
country flaguser name
Germany
2007-08-11 03:55:37
Hello all,

I'm having some difficulties while trying to release an
virus-mail from the quarantine.

Probably I only doing the command wrong, but this is what I
do:
# cd /var/amavis/quarantine/virus
# amavisd-release virus-20070725T112345-21754-01 
450 4.5.0 Failure: SQL quarantine code not enabled /// at
(eval 64) line 320, <GEN12> line 4.

(I added the /// to the message, as it occours 3 times in
amavisd)

the weird thing is, I'm not using SQL.

amavisd.conf:
$virus_quarantine_method = 'local:virus/virus-%i-%n';

so I checked amavisd source, the error occours at line
13027. The release switch at 13022 only goes to the error in
13027, when $quar_type is Q. Now why is it Q?

$quar_type is being set on line 10290. There I read:
$quar_type = /^smtp:/  ? 'M' : /^lmtp:/ ? 'L' :
             /^bsmtp:/ ? 'B' : /^sql:/  ? 'Q' :
             /^local:/ ? ($mbxname=~// ? 'M' :
$mbxname=~/.gzz/ ? 'Z' : 'F')
            : '?'  for (lc($quarantine_method));

so I should get F for local, so it can release the mail from
local file. 

Bug, trick? What to do?

I'm using amavisd-new-2.5.2 from FreeBSD ports collection
with perl-5.8.8.


regards,
Philon



-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free
SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/
de/go/freemail

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gm
x.net/de/go/multimessenger

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

Re: weird behaviour on amavisd-release
country flaguser name
Slovenia
2007-08-24 18:34:14
Philon,

Sorry for a late reply.

> I'm having some difficulties while trying to release an
virus-mail
> from the quarantine.
>
> Probably I only doing the command wrong, but this is
what I do:
> # cd /var/amavis/quarantine/virus
> # amavisd-release virus-20070725T112345-21754-01
> 450 4.5.0 Failure: SQL quarantine code not enabled ...
line 320

> the weird thing is, I'm not using SQL.

The amavisd-release has a simpleminded logic for guessing a
quarantine type.

> amavisd.conf:
> $virus_quarantine_method = 'local:virus/virus-%i-%n';

Your argument to amavisd-release should be exactly as show
in the log,
so in this particular case it seems it needs to be:

$ amavisd-release virus/virus-20070725T112345-21754-01

> so I checked amavisd source, the error occours at line
13027. The release
> switch at 13022 only goes to the error in 13027, when
$quar_type is Q. Now
> why is it Q?
>
> $quar_type is being set on line 10290. There I read:
> $quar_type = /^smtp:/  ? 'M' : /^lmtp:/ ? 'L' :
>        /^bsmtp:/ ? 'B' : /^sql:/  ? 'Q' :
>        /^local:/ ? ($mbxname=~// ? 'M' :
>        $mbxname=~/.gzz/ ? 'Z' : 'F') : '?'
>      for (lc($quarantine_method)); 
>
> so I should get F for local, so it can release the mail
from local file.
>
> Bug, trick? What to do?
> I'm using amavisd-new-2.5.2 from FreeBSD ports
collection with perl-5.8.8.

I think you were looking at the wrong place.
The code in question is in amavisd-release :

sub release_file($$$) {
  my($sock,$mail_file,$secret_id,alt_recips) = _;
  my($fn_path,$fn_prefix,$mail_id,$fn_suffix);
local($1,$2,$3,$4);
  if ($mail_file =~ m{^ ([^/].*/)?
([A-Z0-9][A-Z0-9._-]*[_-])?
                        ([A-Z0-9][A-Z0-9_+-][A-Z0-9])
(.gz)? z}xsi) {
    ($fn_path,$fn_prefix,$mail_id,$fn_suffix) =
($1,$2,$3,$4);
  } elsif ($mail_file =~ m{^ ([^/].*/)? ()
([A-Za-z0-9$._=+-]+?) (.gz)?z}xs){
    ($fn_path,$fn_prefix,$mail_id,$fn_suffix) =
($1,$2,$3,$4);  # old style
  } else {
    usage("Invalid quarantine ID: $mail_file");
  }
  my($quar_type) =
    $fn_suffix eq '.gz' ? 'Z'
    : $fn_path eq '' && $mail_id eq $mail_file ? 'Q'
: 'F';
  my($request_type) = $0 =~ /brequeuez/i ? 'requeue' :
'release';
  my(query) = (
    "request=$request_type",
    "quar_type=$quar_type",
    "mail_id=$mail_id",
  );


Mark

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

Re: weird behaviour on amavisd-release
country flaguser name
Germany
2007-08-28 12:07:10
Hello Mark,

> Sorry for a late reply.

never mind, the problem isn't that important for me. I'm
happy if 
someone just can pushes me in the right direction.

 > [...]
> Your argument to amavisd-release should be exactly as
show in the log,
> so in this particular case it seems it needs to be:
> 
> $ amavisd-release virus/virus-20070725T112345-21754-01

ok, I got one step further. The message I'm getting now is:
mail# amavisd-requeue virus/virus-20070725T112345-21754-01
450 4.5.0 ERROR: Stored quarantine ID '2PIY-oPeKIwt' does
not match 
requested ID 'virus-20070725T112345-21754-01' at
/usr/local/sbin/amavisd 
line 7212, <GEN32> line 7.

so probably it might be that these IDs are stored only for a
specific 
time. Do you have an idea?

Sorry to bug you with this, but I can't seem to find any
reliable 
documentation on release/requeue processing.


thanks,
Philon

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )