Hi,

I've been trying to use policyd v2 with amavis, but I'm getting an
error in the logs from one of the commands in the custom script
amavisd-policyd.pm included for integration with amavis.

sub process_policy {
        my($self,$conn,$msginfo,$pbn) = @_;

        do_log(5,"policyd/process_policy: Starting");

        # Get message ID
        my ($lastReceived) = $msginfo->orig_header_fields->{'received'};
        do_log(-1,"lastReceived = '$lastReceived'");
        if (!($lastReceived =~ /with E?SMTP id ([0-9A-Z]+)/)) {
                do_log(-1,"policyd/process_policy: Failed to parse in
queue id from received line '$lastReceived'");
                return $pbn;
        }


The variable "$lastReceived" contains a single digit rather than the
line I would have expected to be returned. I've tried 'from' and
'subject' in place of 'received' to see what was returned but still
just get a single digit returned by
"$msginfo->orig_header_fields->{'???'};".
I also tried running $msginfo->orig_header_fields-> in "sub
check_for_banned_names($$)" in the amavisd just to see the result and
had single digits returned instead of the actual line from the headers
which I believe I should be getting back?

I've had this problem with the Ubuntu package and the official release
of version 2.6.1 from the amavisd-new website. Does anyone have any
idea what could be causing this or where I can start to look for the
cause?

Thanks
Guy

-- 
Don't just do something...sit there!

------------------------------------------------------------------------------
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to