Allow filenames based on headers

Alex Martin alexmartin.bu at gmail.com
Fri Jan 8 11:07:50 CET 2016


Hello,

I wanted to check again to see if functionality in amavisd-new existed for
this.
Currently pulling out hair trying to work this out :)

Best regards,
Alex

On 30 December 2015 at 12:42, Alex Martin <alexmartin.bu at gmail.com> wrote:

> 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 recipients' email addresses. But ideally I would
> like to know if we can make exceptions based on headers (as sender can be
> easily spoofed).
>
> Something like if email appears to be from smtp.example.com allow zip
> file attachments.
>
> Does anyone know if this is possible or have any recommendations we can
> try?
>
> Many thanks,
> Alex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20160108/6e9794f9/attachment.html>


More information about the amavis-users mailing list