Allow filenames based on headers

Patrick Ben Koetter p at sys4.de
Fri Jan 8 12:29:15 CET 2016


* Alex Martin <alexmartin.bu at gmail.com>:
> 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 :)

If you are able to identify sender domains via DKIM you can create exceptions
for these domains. See author_to_policy_banks.

p at rick




> 
> 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
> >
> >

-- 
[*] sys4 AG
 
https://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein
 


More information about the amavis-users mailing list