Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for perl-modules/Platon/Log/Mail/Postfix.pm between version 1.7 and 1.8

version 1.7, 2004/12/09 10:31:27 version 1.8, 2004/12/09 12:33:31
Line 10 
Line 10 
 # 2004-10-19 - created  # 2004-10-19 - created
 #  #
   
 # $Platon: perl-modules/Platon/Log/Mail/Postfix.pm,v 1.6 2004/11/28 23:01:06 rajo Exp $  # $Platon: perl-modules/Platon/Log/Mail/Postfix.pm,v 1.7 2004/12/09 10:31:27 rajo Exp $
   
 package Platon::Log::Mail::Postfix;  package Platon::Log::Mail::Postfix;
   
Line 94  sub savelog($$;)
Line 94  sub savelog($$;)
                 }                  }
   
                 # $xx->{status} = "Not-Delivered" or "Passed" or "BANNED" or "INFECTED"                  # $xx->{status} = "Not-Delivered" or "Passed" or "BANNED" or "INFECTED"
                 ($xx->{amavis_counter}, $xx->{status}, $line) = ($line =~ m/^\(\d+-(\d+)\) ([^,\s]+)[\s,]*(.*)$/o);                  ($xx->{amavis_id}, $xx->{status}, $line) = ($line =~ m/^\(([\d-]+)\) ([^,\s]+)[\s,]*(.*)$/o);
                   ($xx->{amavis_counter}) = ($xx->{amavis_id} =~ m/(\d+)$/o);
                 if ($xx->{status} eq 'INFECTED') {                  if ($xx->{status} eq 'INFECTED') {
                         ($xx->{amavis_virus_name}, $line) = ($line =~ m/^\(([^\)]+)\), (.*)$/o);                          ($xx->{amavis_virus_name}, $line) = ($line =~ m/^\(([^\)]+)\), (.*)$/o);
                 }                  }
Line 249  sub savelog($$;)
Line 250  sub savelog($$;)
   
                         # try to parse status info from amavis:                          # try to parse status info from amavis:
                         # ... relay=127.0.0.1[127.0.0.1], delay=4, status=sent (250 2.6.0 Ok, id=32286-03, from MTA: 250 Ok: queued as 9A1491400624)                          # ... relay=127.0.0.1[127.0.0.1], delay=4, status=sent (250 2.6.0 Ok, id=32286-03, from MTA: 250 Ok: queued as 9A1491400624)
                         if ($xx->{rest} =~ m/queued as (\S+)\)$/o) {                          if ($xx->{rest} =~ m/id=(\S+),.*queued as (\S+)\)$/o) {
                                 $xx->{new_postfix_key} = $1;                                  $xx->{amavis_id} = $1;
                                   $xx->{new_postfix_key} = $2;
                         }                          }
   
                         return $self->_savelog($xx);                          return $self->_savelog($xx);
Line 315  sub _savelog($$;)
Line 317  sub _savelog($$;)
                 $data->{size},                  $data->{nrcpt},                 $data->{relay}, $data->{delay},                  $data->{size},                  $data->{nrcpt},                 $data->{relay}, $data->{delay},
                 $data->{status},                $data->{proto},                 $data->{helo},  $data->{sasl_method},                  $data->{status},                $data->{proto},                 $data->{helo},  $data->{sasl_method},
                 $data->{sasl_username},                  $data->{sasl_username},
                 $data->{amavis_counter},        $data->{amavis_virus_name},     $data->{amavis_banned_file},                  $data->{amavis_id},             $data->{amavis_counter},        $data->{amavis_virus_name},     $data->{amavis_banned_file},
                 $data->{amavis_quarantine},     $data->{amavis_SA_score},                  $data->{amavis_quarantine},     $data->{amavis_SA_score},
                 $data->{rest}                  $data->{rest}
         ) or warn $self->{sql_insert}->errstr;          ) or warn $self->{sql_insert}->errstr;
Line 340  sub _init($$;)
Line 342  sub _init($$;)
                         mail_size, mail_nrcpt, relay, delay,                          mail_size, mail_nrcpt, relay, delay,
                         status, proto, helo, sasl_method,                          status, proto, helo, sasl_method,
                         sasl_username,                          sasl_username,
                         amavis_counter, amavis_virus_name, amavis_banned_file,                          amavis_id, amavis_counter, amavis_virus_name, amavis_banned_file,
                         amavis_quarantine, amavis_SA_score,                          amavis_quarantine, amavis_SA_score,
                         message)                          message)
                 VALUES                  VALUES
Line 351  sub _init($$;)
Line 353  sub _init($$;)
                         ?, ?, ?, ?,                          ?, ?, ?, ?,
                         ?, ?, ?, ?,                          ?, ?, ?, ?,
                         ?,                          ?,
                         ?, ?, ?,                          ?, ?, ?, ?,
                         ?, ?,                          ?, ?,
                         ?)                          ?)
                 ");                  ");

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top