Mark Martinec wrote the following on 09/12/09 16:19:
>
> If it suffices to base the decision on these mail header fields, you can
> supply a small custom hook which loads a policy bank, which can do
> whatever you want, like disabling adding disclaimers when loaded.
>
>
> amavisd.conf:
>
> $policy_bank{'OUR-REPLY'} = {
>    allow_disclaimers =>  0,
> };
>
> include_config_files('/etc/amavisd-custom.conf');
>
>
>
> /etc/amavisd-custom.conf :
>
> package Amavis::Custom;86.140.117.185
> use strict;
> sub new {
>    my($class,$conn,$msginfo) = @_;
>    my($self) = bless {}, $class;
>    my($subj) = $msginfo->get_header_field_body('subject');
>    my($refs) = $msginfo->get_header_field_body('references');
>    my($inre) = $msginfo->get_header_field_body('in-reply-to');
>    if ($msginfo->originating&&
>        (defined $refs || defined $inre || $subj =~ /^\s*re:/i)) {
>      Amavis::load_policy_bank('OUR-REPLY');
>    }
>    $self;
> }
> 1;  # insure a defined return
>
>
> Mark

Mark

Thanks. Just shows how much I've yet to learn :-)

Alan

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
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