Can't locate "spam_level" in Amavis::In::Message
Alex
mysqlstudent at gmail.com
Fri Apr 26 23:56:14 CEST 2013
Hi,
I've recently upgrade from v2.6.6 to v2.8.0, and since the upgrade, I'm
receiving the following error in my logs:
Apr 26 17:47:02 juggernaut amavis[12214]: (12214-04) (!)custom before_send
error: Can't locate object method "spam_level" via package
"Amavis::In::Message" at /etc/amavisd/amavisd-custom.conf line 118.
I'm using Amavis::Custom to create a custom log entry in syslog and db with
quarantined messages with info including spam_level. It appears
$msginfo->spam_level has moved to Amavis::In::Message::PerRecip so somehow
isn't available in my amavisd-custom.conf file.
How can I "import" the Amavis::In::Message::PerRecip package into my
custom.conf file so I can use this function?
My config is too large to include, but this is the relevant parts:
package Amavis::Custom;
use strict;
use DBI qw(:sql_types);
use DBD::mysql;
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;
import Amavis::In::Message::PerRecip;
}
sub before_send {
my($self,$conn,$msginfo) = @_;
my($loc_level) = $msginfo->spam_level;
my($loc_digest) = $msginfo->body_digest;
my($loc_partit) = $msginfo->partition_tag;
my($loc_mail) = $msginfo->mail_id;
...
}
The other functions work fine. Any ideas why just $msginfo->spam_level
doesn't work would be greatly appreciated.
Thanks,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20130426/7ac2fb4b/attachment.html>
More information about the amavis-users
mailing list