Accessing $msginfo structure
mysqlstudent at gmail.com
Wed Feb 25 04:25:47 CET 2015
I'm using amavisd-new-2.9.1 on fedora20 and implementing the custom
hooks to record info about each message to syslog.
I successfully have it reporting things like the quarantine file name,
sender/recipient, etc, but having trouble with printing the
$msginfo->virusnames variable. I'm more-or-less a perl novice.
After having established the variable is defined, when I try to print
$msginfo->virusnames, it instead prints ARRAY(0x9813058).
my($loc_virus) = $msginfo->virusnames;
If I try to access it as an array, it just produces an error:
my($loc_virus) = join(", ",@$msginfo->virusnames);
Feb 24 00:17:58 mail01 amavis: (09463-04) (!)custom before_send
error: Not an ARRAY reference at /etc/amavisd/amavisd-custom-new.conf
What is the proper way to access this particular variable/array and
print something like "Sanesecurity.Junk.23965.UNOFFICIAL"?
Would it be the same for some of the other variables such as spam_report
More information about the amavis-users