Hi,<br><br>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:<br><br>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.<br>
<br>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.<br>
<br>How can I "import" the Amavis::In::Message::PerRecip package into my custom.conf file so I can use this function?<br><br>My config is too large to include, but this is the relevant parts:<br><br>package Amavis::Custom;<br>
use strict;<br><br>use DBI qw(:sql_types);<br>use DBD::mysql;<br><br>BEGIN {<br> import Amavis::Log qw(write_log);<br> import Amavis::Conf qw(:platform :confvars c cr ca $myhostname);<br> import Amavis::Util qw(do_log prolong_timer ll untaint safe_encode safe_decode);<br>
import Amavis::rfc2821_2822_Tools;<br> import Amavis::In::Message::PerRecip;<br>}<br><br>sub before_send {<br> my($self,$conn,$msginfo) = @_;<br> my($loc_level) = $msginfo->spam_level;<br> my($loc_digest) = $msginfo->body_digest;<br>
my($loc_partit) = $msginfo->partition_tag;<br> my($loc_mail) = $msginfo->mail_id;<br>...<br>}<br><br>The other functions work fine. Any ideas why just $msginfo->spam_level doesn't work would be greatly appreciated.<br>
<br>Thanks,<br>Alex<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>