<div dir="ltr">Hello,<div><br></div><div>I wanted to check again to see if functionality in amavisd-new existed for this.</div><div>Currently pulling out hair trying to work this out :)</div><div><br></div><div>Best regards,</div><div>Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 December 2015 at 12:42, Alex Martin <span dir="ltr"><<a href="mailto:alexmartin.bu@gmail.com" target="_blank">alexmartin.bu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hello,<div><br></div><div>We have recently started to block incoming emails with a zip file attachment.</div><div><br></div><div>Here's the bit from our amavisd.conf file:</div><div><font face="monospace, monospace"><br></font></div><div><div><font face="monospace, monospace">%banned_rules = (</font></div><div><font face="monospace, monospace"> 'BLOCK_ALL' => new_RE(</font></div><div><font face="monospace, monospace"> [ qr'^text/plain$'i => 0 ],</font></div><div><font face="monospace, monospace"> [ qr'^\.[a-zA-Z0-9]*$' => 1 ] ),</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> 'BLOCK_ZIP' => new_RE(</font></div><div><font face="monospace, monospace"> [ qr'^\.zip$' ],</font></div><div><font face="monospace, monospace"> ),</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> 'DEFAULT' => $banned_filename_re,</font></div><div><font face="monospace, monospace">);</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">@banned_filename_maps = ({</font></div><div><font face="monospace, monospace"> '.<a href="http://domain1.co.uk" target="_blank">domain1.co.uk</a>' => 'BLOCK_ZIP',</font></div><div><font face="monospace, monospace"> '.<a href="http://domain2.com" target="_blank">domain2.com</a>' => 'BLOCK_ZIP',</font></div><div><font face="monospace, monospace"> '.<a href="http://domain3.net" target="_blank">domain3.net</a>' => 'BLOCK_ZIP',</font></div><div><font face="monospace, monospace"> '.<a href="http://domain4.co.uk" target="_blank">domain4.co.uk</a>' => 'BLOCK_ZIP',</font></div><div><font face="monospace, monospace"> '.<a href="http://domain5.co.uk" target="_blank">domain5.co.uk</a>' => 'BLOCK_ZIP',</font></div><div><font face="monospace, monospace"> '.' => 'DEFAULT',</font></div><div><font face="monospace, monospace">});</font></div></div><div><br></div><div>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).<br></div><div><br></div><div>Something like if email appears to be from <a href="http://smtp.example.com" target="_blank">smtp.example.com</a> allow zip file attachments.</div><div><br></div><div>Does anyone know if this is possible or have any recommendations we can try?</div><div><br></div><div>Many thanks,</div><div>Alex</div></div>
</div><br></div>
</blockquote></div><br></div>