More Amavis::Custom questions
Alex
mysqlstudent at gmail.com
Sat Apr 27 04:13:54 CEST 2013
Hi all,
As I mentioned in a recent post, I'm trying to use Amavis::Custom in v2.8.0
to build a database of quarantined messages. This was working with 2.6.6,
but it looks like Amavis::In::Message has since changed, and some of the
functions have been moved to Amavis::In::Message::PerRecip, I believe.
Now I don't understand why $msginfo->infected seems to no longer exist. Is
there a replacement equivalent?
Here is the code section from my amavisd-custom.conf file:
package Amavis::Custom;
use strict;
BEGIN {
import Amavis::Log qw(write_log);
import Amavis::Conf qw(:platform :confvars c cr ca $myhostname);
import Amavis::Util qw(do_log prolong_timer ll untaint safe_encode
safe_decode);
import Amavis::rfc2821_2822_Tools;
}
...
sub before_send {
my($self,$conn,$msginfo) = @_;
my($loc_logid) = $msginfo->log_id; # log ID string, e.g.
'48262-21-2'
my($loc_size) = $msginfo->msg_size; # mail size in bytes
#my($loc_level) = $msginfo->spam_level; # spam level (without
per-recip boost)
my($loc_digest) = $msginfo->body_digest;
my($loc_partit) = $msginfo->partition_tag;
my($loc_mail) = $msginfo->mail_id;
my ($loc_rmbxname,$loc_infect,$loc_slevel);
for my $r (@{$msginfo->per_recip_data}) {
$loc_rmbxname = $r->recip_mbxname;
$loc_infect = $r->infected;
}
The only functions that don't work here are $r->infected and
$msginfo->spam_level. Have they been moved? What is the best way to access
this info?
Thanks,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20130426/e2d2373c/attachment.html>
More information about the amavis-users
mailing list