26

Re: Error releasing from quarantine

I checked Amavisd-new SRPM from EPEL, it does provide a patch to fix this issue.

diff --git a/amavisd b/amavisd
index f721756..2a2c418 100755
--- a/amavisd
+++ b/amavisd
@@ -20208,7 +20208,7 @@ sub preprocess_policy_query($$) {
     new_am_id('rel-'.$msginfo->mail_id)  if $releasing;
     if ($releasing && $quar_type eq 'Q') {  # releasing from SQL
       do_log(5, "preprocess_policy_query: opening in sql: %s",
-                $msginfo->mail_id);
+                $msginfo->parent_mail_id);
       my $obj = $Amavis::sql_storage;
       $Amavis::extra_code_sql_quar && $obj
         or die "SQL quarantine code not enabled (3)";
@@ -20218,31 +20218,31 @@ sub preprocess_policy_query($$) {
       if (!defined($msginfo->partition_tag) &&
           defined($sel_msg) && $sel_msg ne '') {
         do_log(5, "preprocess_policy_query: missing partition_tag in request,".
-                  " fetching msgs record for mail_id=%s", $msginfo->mail_id);
+                  " fetching msgs record for mail_id=%s", $msginfo->parent_mail_id);
         # find a corresponding partition_tag if missing from a release request
         $conn_h->begin_work_nontransaction;  #(re)connect if necessary
-        $conn_h->execute($sel_msg, untaint($msginfo->mail_id));
+        $conn_h->execute($sel_msg, untaint($msginfo->parent_mail_id));
         my $a_ref; my $cnt = 0; my $partition_tag;
         while ( defined($a_ref=$conn_h->fetchrow_arrayref($sel_msg)) ) {
           $cnt++;
           $partition_tag = $a_ref->[0]  if !defined $partition_tag;
           ll(5) && do_log(5, "release: got msgs record for mail_id=%s: %s",
-                             $msginfo->mail_id, join(', ',@$a_ref));
+                             $msginfo->parent_mail_id, join(', ',@$a_ref));
         }
         $conn_h->finish($sel_msg)  if defined $a_ref;  # only if not all read
         $cnt <= 1 or die "Multiple ($cnt) records with same mail_id exist, ".
                          "specify a partition_tag in the AM.PDP request";
         if ($cnt < 1) {
           do_log(0, "release: no records with msgs.mail_id=%s in a database, ".
-                    "trying to read from a quar. anyway", $msginfo->mail_id);
+                    "trying to read from a quar. anyway", $msginfo->parent_mail_id);
         }
         $msginfo->partition_tag($partition_tag);  # could still be undef/NULL !
       }
       ll(5) && do_log(5, "release: opening mail_id=%s, partition_tag=%s",
-                         $msginfo->mail_id, $msginfo->partition_tag);
+                         $msginfo->parent_mail_id, $msginfo->partition_tag);
       $conn_h->begin_work_nontransaction;  # (re)connect if not connected
       $fh = Amavis::IO::SQL->new;
-      $fh->open($conn_h, $sel_quar, untaint($msginfo->mail_id),
+      $fh->open($conn_h, $sel_quar, untaint($msginfo->parent_mail_id),
                 'r', untaint($msginfo->partition_tag))
         or die "Can't open sql obj for reading: $!";  1;
     } else {  # mail checking or releasing from a file

----

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

27

Re: Error releasing from quarantine

fsantiago06111979 wrote:

Aug  4 12:52:56 mail amavis[16604]: (rel-SjATB8bB_-gB) Amavis::IO::SQL::open key=SjATB8bB_-gB, p_tag=: no such record
Aug  4 12:52:56 mail amavis[16604]: (rel-SjATB8bB_-gB) (!!)policy_server FAILED: Can't open sql obj for reading: No such file or directory at (eval 109) line 375, <GEN311> line 5.

Dear fsantiago06111979,

I finally fixed above issue. You can try this:

*) Open file libs/amavisd/quarantine.py under iRedAdmin-Pro directory
*) find line '#s.recv(1024)', uncomment it by removing the leading '#' character.
*) Restart Apache or uwsgi (if you're running Nginx) service to reload modified code.

This should fix this issue.

So sorry that it toke so long.

28

Re: Error releasing from quarantine

ZhangHuangbin wrote:
fsantiago06111979 wrote:

Aug  4 12:52:56 mail amavis[16604]: (rel-SjATB8bB_-gB) Amavis::IO::SQL::open key=SjATB8bB_-gB, p_tag=: no such record
Aug  4 12:52:56 mail amavis[16604]: (rel-SjATB8bB_-gB) (!!)policy_server FAILED: Can't open sql obj for reading: No such file or directory at (eval 109) line 375, <GEN311> line 5.

Dear fsantiago06111979,

I finally fixed above issue. You can try this:

*) Open file libs/amavisd/quarantine.py under iRedAdmin-Pro directory
*) find line '#s.recv(1024)', uncomment it by removing the leading '#' character.
*) Restart Apache or uwsgi (if you're running Nginx) service to reload modified code.

This should fix this issue.

So sorry that it toke so long.

Thank you. I am no longer using the pro admin so it doesn't help me at the moment. But I'll file it away in case I ever return to the pro version. I switched backends to mariadb. Thanks again.

29

Re: Error releasing from quarantine

fsantiago06111979 wrote:

Thank you. I am no longer using the pro admin so it doesn't help me at the moment. But I'll file it away in case I ever return to the pro version. I switched backends to mariadb. Thanks again.

So sad to lose you. your license expired on Jun 1st, 2015. Would you mind sharing why you didn't want to renew the license of iRedAdmin-Pro?

30

Re: Error releasing from quarantine

ZhangHuangbin wrote:
fsantiago06111979 wrote:

Thank you. I am no longer using the pro admin so it doesn't help me at the moment. But I'll file it away in case I ever return to the pro version. I switched backends to mariadb. Thanks again.

So sad to lose you. your license expired on Jun 1st, 2015. Would you mind sharing why you didn't want to renew the license of iRedAdmin-Pro?


A.) cost - I only run a small private server for personal use with 1-10 users and a handful of domains so I can't justify the cost.

B.) backend - I upgraded to centos 7.x with mariadb backend. I used to use PostgreSQL. So to my understanding I couldn't just upgrade / renew; I would have to purchase a new license correct? Regardless, either way, I still can't justify the cost.

If you ever figure out a way to offer your free pro admin for limited use, I would love that. It was great when I had it.

31

Re: Error releasing from quarantine

fsantiago06111979 wrote:

B.) backend - I upgraded to centos 7.x with mariadb backend. I used to use PostgreSQL. So to my understanding I couldn't just upgrade / renew; I would have to purchase a new license correct?

On May 15, 2015, we released iRedMail-0.9.1 and new iRedAdmin-Pro, in the meantime, we merged MySQL/MariaDB and PostgreSQL editions to only one edition - iRedAdmin-Pro-SQL (v2.0), it supports MySQL, MariaDB and PostgreSQL. So you don't need to buy a new license in this case.

May i know the version number of iRedMail you're running? You can check /etc/iredmail-release. Let's see whether we can work out a solution.