Jason wrote:

> Hello everyone,

> we are using Postfix with AMaViS-new to filter all incoming and outgoing
> emails for spam and virus messages. One of our applications
> (unfortunately closed source and for accounting purposes) attaches an
> base64 encoded asc file to the message, which is wrongly recognised as
> 'exe-ms' file and is banned due to our configuration.

> Is there a way to set up a recipient based whitelist mechanism? I just
> found a whitelist mechanism for spam handling. Our application send the
> email only to one address.

> Perl Version is 5.008008
> AMaViS-new version is 2.3.3 (20050822)
> Postfix version is 2.2.9

> Regards,
> Jason

The simple solution is to make that user a banned_files_lover

@banned_files_lovers_maps = ( [qw( [EMAIL PROTECTED] )] );

but of course this means that anyone can send banned files to this
address.

The more complex solution uses per-recipient banned rules settings.
Possibly something like this (not sure if the syntax is precisely
correct, but this did work for me):

@banned_filename_maps = (
    {'[EMAIL PROTECTED]' => 'ALLOW_ASC',
     '.' => 'DEFAULT'}
);

%banned_rules = (
  'ALLOW_ASC' =>  new_RE(     # create a custom banned rules set
     [qr'.\.(asc)$'i => 0],  # pass .asc files
     # above we allow exceptions to the current banned files
     # below we repeat the what we have in $banned_filename_re
     qr'\.[^./]*[A-Za-z][^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i,
     [ qr'^\.(rpm|cpio|tar)$' => 0 ],  # allow any in Unix-type archives
     qr'.\.(vbs|pif|scr|cmd|cpl|bat)$'i,  # banned extension - basic
     qr'^\.(lha|cab|dll)$',  # banned file(1) types
     ),
  'DEFAULT' => $banned_filename_re, # gotta have this
);

These settings assume you are using $banned_filename_re and must be
placed after the $banned_filename_re section. Search for
@banned_filename_maps in
http://www.ijs.si/software/amavisd/release-notes.txt for more info.


Or you could possibly simply allow .asc files to everyone which
normally should not be a risk. Simply place this allow:
      [qr'.\.(asc)$'i => 0],  # pass .asc files at this point
      # just before the rule that bans it:
      qr'^\.(exe-ms)$', # banned file(1) types

Gary V


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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