David,

> I want to block pps file and other file only for policy bank AM.PDP-SOCK
> this the policy bank config
> $policy_bank{'AM.PDP-SOCK'} = {
>   protocol => 'AM.PDP',
>   notify_method  => 'pipe:flags=q argv=/usr/sbin/sendmail -Ac -i -f ${sender} 
> -- ${recipient}',
>   auth_required_release => 0,
>   bypass_banned_checks_maps => [0],
>   banned_filename_re = 
> new_RE(\qr'.\.(exe|vbs|pif|scr|bat|cmd|com|cpl|pps|doc)$'i),
> };
> 
> but this did not working, see logs below,

It doesn't work because banned_filename_re is not a member of policy banks and 
is
ignored.  You'd need to give a banning policy a name and use 
@banned_filename_maps,
e.g.:

%banned_rules = (
  'NO-VIDEO' => new_RE( qr'^\.movie$',
    qr'.\.(asf|asx|mpg|mpe|mpeg|avi|mp3|wav|wma|wmf|wmv|mov|vob)$'i, ),
  'NO-MOVIES' => new_RE( qr'^\.movie$', qr'.\.(mpg|avi|mov)$'i, ),
  'NO-PPS' => new_RE(\qr'.\.(exe|vbs|pif|scr|bat|cmd|com|cpl|pps|doc)$'i),
  'DEFAULT' => $banned_filename_re,
);

$policy_bank{'AM.PDP-SOCK'} = {
  protocol => 'AM.PDP',
  ...
  banned_filename_maps => ['NO-PPS'],
};


Mark

------------------------------------------------------------------------------

_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 Please visit http://www.ijs.si/software/amavisd/ regularly
 For administrativa requests please send email to rainer at openantivirus dot 
org

Reply via email to