Hacking amavisd $msginfo
Alex
mysqlstudent at gmail.com
Mon Jun 13 21:30:22 CEST 2011
Hi,
I'm trying to modify amavisd-new-2.6.4 to write specific headers to
syslog when a spam is found, and I believe utilizing the $msginfo
header in mail_to_local_mailbox is the proper way to do this. This
function appears to have all the information about the spam message,
including the quarantined file's name.
I'm somewhat of a beginning perl programmer, so I'm really not sure
how to do this. How can I access the individual elements of the
$msginfo structure? Where are they defined?
I've tried variations of trying to access the hash, but I don't think
I'm doing it properly:
my ($my_subject) = $msginfo->get_header_field('subject');
What is the proper way to access the actual list of recipients, and
not (apparently?) a pointer to it?
my $loc_recips = $msginfo->recips;
do_log(0,"loc recips: $loc_recips");
I realize this is probably a basic perl problem, but I hoped to learn
more about perl and amavis, and thought this was a fun project for me.
Ideas greatly appreciated.
Thanks,
Alex
More information about the amavis-users
mailing list