Ronie Gilberto Henrich wrote:

> Hi,

>   I am using the following rule to block mp3 files of being received
> by domain example.com (recipient == @.example.com), which is hosted
> by us.

> @banned_filename_maps = (
>        {
>          '.example.com' => 'AUDIO',
>          '.' => 'DEFAULT',
>        },
> );


>   Is it any way to enforce that rule also to block mp3 files of being
> sent by domain example.com (sender == @.example.com)?

maybe you can use policy_banks like this:

$inet_socket_port = [10024,10026];
$interface_policy{'10026'} = 'BLOCKAUDIO';

$policy_bank{'BLOCKAUDIO'} = {
 banned_filename_maps => ['MYNETS-DEFAULT'],
};

%banned_rules = (
  'MYNETS-DEFAULT' => new_RE(
  [qr'.\.(mp3|mp4)$'i => 1],
  ),
  'DEFAULT' => $banned_filename_re,
);

Then you could use check_sender_access with postfix like this:

smtpd_sender_restrictions =
  check_sender_access hash:/etc/postfix/amavis_block_audio

Then you can set this in /etc/postfix/amavis_block_audio

example.com FILTER smtp-amavis:[127.0.0.1]:10026

All E-Mails from example.com go through amavis, port 10026.

I've not tested this but it's an idea.

-- 
Daniel



------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
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