bad_header_lovers

Pasi Kärkkäinen pasik at iki.fi
Mon Jan 26 20:16:34 CET 2015


Hello,

Replying to an old thread..

On Fri, Mar 23, 2012 at 02:47:33PM +0100, Mark Martinec wrote:
> Andrea,
> 
> > I need to skip the bad_header results based on the from address.
> > Is it possible? If yes, haw can I configure it?
> 
> Currently you can only do this through loading of a policy bank,
> e.g.:
> 
> $policy_bank{'NOHCHK'} = {
>   bypass_header_checks_maps => [1]
> };
> 
> A policy bank can be loaded based on an incoming TCP port number,
> or based on a SMTP client's IP address, or based on a valid DKIM
> signature. This is certainly a cleanest and simplest solution,
> e.g.:
> 
> @author_to_policy_bank_maps = (
>   {
>     'example.com' => 'NOHCHK',
>   }
> );
> 
> 
> There is no off-the-shelf mechanism to load a policy bank based
> on a sender address, although you can do so through a custom hook,
> e.g.:
> 
> amavisd.conf:
>   include_config_files('/etc/amavisd-custom.conf');
> 
> 
> amavid-custom.conf:
> 
> package Amavis::Custom;
> use strict;
> 
> sub new {
>   my($class,$conn,$msginfo) = @_;
>   my $self = bless {}, $class;
>   if ($msginfo->sender =~ /\@example\.com\z/i ) {
>     Amavis::load_policy_bank('NOHCHK',$msginfo);
>   }
>   $self;
>


I'm not a perl expert but should that be "return $self" instead? 


> }
> 
> 1;
> 
> 
> 
>   Mark


Thanks,

-- Pasi



More information about the amavis-users mailing list