Per user x-spam-status
Nuno Fernandes
npf-mlists at eurotux.com
Mon Aug 20 15:00:36 CEST 2012
On Wednesday 25 July 2012 16:59:58 Nuno Fernandes wrote:
> Hello,
>
> In my setup, users get the email with the X-Spam-Status header:
>
> X-Spam-Status: No, score=-2.881 tagged_above=-999 required=5
> tests=[AWL=-0.258, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
> DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001......
>
> For some users i would like to remove the values of the test scores. I'm
> trying to write a custom module for that but i don't see the header:
>
> package Amavis::Custom;
> use strict;
> use Data::Dumper;
>
> BEGIN {
> import Amavis::Conf qw(:platform :confvars c cr ca);
> import Amavis::Util qw(do_log);
> }
>
> sub new {
> my($class,$conn,$msginfo) = @_;
> bless {}, $class;
> }
>
> sub before_send {
> my($self,$conn,$msginfo) = @_;
> my($all_local) = !grep { !$_->recip_is_local }
> @{$msginfo->per_recip_data};
> if ($all_local) {
> my($hdr_edits) = $msginfo->header_edits;
> $hdr_edits->edit_header('X-Spam-Status', sub {
> open (FH, "> /tmp/log");
> print FH Dumper(\@_);
> close FH;
> });
> }
> };
> 1; # insure a defined return
>
> The file /tmp/log isn't created at all. Anyone knows where the problem
> is? Is there a better way of doing that?
>
> Thanks.
> Best regards,
> Nuno Fernandes
Hello,
Does anyone have any clues about this?
Thanks,
Nuno Fernandes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20120820/dcab0d6c/attachment.html>
More information about the amavis-users
mailing list