Hello,

We have recently started to block incoming emails with a zip file
attachment.

Here's the bit from our amavisd.conf file:

%banned_rules = (
  'BLOCK_ALL' =>  new_RE(
    [ qr'^text/plain$'i => 0 ],
    [ qr'^\.[a-zA-Z0-9]*$'   => 1 ] ),

  'BLOCK_ZIP'   =>      new_RE(
    [ qr'^\.zip$' ],
    ),

  'DEFAULT' => $banned_filename_re,
);

@banned_filename_maps = ({
  '.domain1.co.uk'       =>      'BLOCK_ZIP',
  '.domain2.com'         =>      'BLOCK_ZIP',
  '.domain3.net'         =>      'BLOCK_ZIP',
  '.domain4.co.uk'       =>      'BLOCK_ZIP',
  '.domain5.co.uk'       =>      'BLOCK_ZIP',
  '.'                    =>      'DEFAULT',
});

However, naturally now we need to make exceptions. I realise that we can
set the above based on recipient email addresses. But ideally I would like
to know if we can make exceptions based on headers (as sender can be easily
spoofed).

Does anyone know if this is possible or have any recommendations we can try?

Many thanks,
Alex

Reply via email to