Hi, I'm trying to insert a "X-DSPAM-Signature" in emails with the following config. The tempfiles are well created with the "X-DSPAM-Signature" I want, then deleted, but the policy_bank seems to fail while I got nothing in processed emails. Any ideas what's my problem ?
------------------------------------------------------------------------------------------------------------------------ use strict; package Amavis::Custom; use File::Temp (); BEGIN { import Amavis::Conf qw(:platform :confvars c cr ca $myhostname); import Amavis::Util qw(do_log untaint min max); } sub new { my($class,$conn,$msginfo) = @_; my($self) = bless {}, $class; $self; } sub dynamic_altermime_disclaimer { my($self,$conn,$msginfo) = @_; my($fh, $filename) = File::Temp::tempfile("fileXXXXX", SUFFIX => '.txt', DIR => '/tmp/'); $fh->print(<<"EOD") or die "Error writing to $filename: $!"; $msginfo->{'hdr_edits'}->{'addrcvd'}->[3] EOD $fh->close or die "Can't close $filename: $!"; $policy_bank{'DYNAMIC_DISCLAIMER'} = { allow_disclaimers => 1, altermime_args_disclaimer => ['--verbose', "--disclaimer=$filename"], }; Amavis::load_policy_bank('DYNAMIC_DISCLAIMER'); if (defined $filename) { unlink($filename) or die "Can't remove $filename: $!"; } } 1; # ensure a defined return ------------------------------------------------------------------------------------------------------------------------ Marc ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ 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/