Daniela,
> > I am using amavisd-new-2.4.5 and I want to be able to block outgoing
> > mail with banned attachments (although I don't agree with this policy).
> >
> > I already block incoming mail with banned attachments, I've defined
> > some %banned_rules and each user has its own rules.
> > For each incoming mail amavis does a lookup for the recipient rules and
> > applies them correctly.
> > However I can not figure out how to make amavis apply these same rules
> > for outgoing mail. All outgoing messages pass clean. Is there any way I
> > can do this?
Besides checking what Sahil Tandon said, make sure you have
an entry for '.' (i.e. any domain) in @banned_filename_maps
and that it maps to $banned_filename_re directly or to a banned
lookup table through a name such as 'DEFAULT' in %banned_rules.
E.g.:
%banned_rules = (
'NO-MS-EXEC'=> new_RE( qr'^\.(exe-ms)$' ),
'PASSALL' => new_RE( [qr'^' => 0] ),
'ALLOW_EXE' => # pass executables except if name
# ends in .vbs .pif .scr .bat
new_RE( qr'.\.(vbs|pif|scr|bat)$'i, [qr'^\.exe$' => 0] ),
'ALLOW_VBS' => # allow names ending in .vbs
new_RE( [qr'.\.vbs$' => 0] ),
'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, ),
'MYNETS-DEFAULT' => new_RE(
[ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow any in Unix-type archives
qr'.\.(vbs|pif|scr)$'i, # banned extension - rudimentary
),
'DEFAULT' => $banned_filename_re,
);
@banned_filename_maps = (
{ '[EMAIL PROTECTED]' => 'NO-MS-EXEC,PASSALL',
'[EMAIL PROTECTED]' => 'ALLOW_EXE',
'[EMAIL PROTECTED]' => 'ALLOW_VBS',
'[EMAIL PROTECTED]' => 'ALLOW_VBS,ALLOW_EXE',
'.' => 'DEFAULT',
},
);
Mark
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/