On 10/20/2014 1:05 PM, Deeztek Support wrote: > >> >> >> These questions are already answered in the RELEASE_NOTES and the >> comments in amavisd.conf and amavisd.conf-sample. See them for more >> details. >> >> >> >> >> -- Noel Jones >> > > I've been through the RELEASE_NOTES and the amavisd.conf files and > they don't seem very clear to me which is why I'm asking. I > appreciate the explanation so far though. So, if I wanted to ban > .xls (ms excel files) for instance, how would I add that. > > like this? > > qr'.\.(xls)$'i => 1
sort of... The => 1 isn't necessary, and the "( )" parenthesis aren't necessary for a single extension. And don't forget you need a "," comma at the end of the expression. qr'.\.xls$'i, If you use the "=> 1" construct, remember to enclose the expression in "[ ]" brackets. See the examples in amavsid.conf for proper syntax. > > or like this? > > qr'^\.(xls)$'i => 1 Maybe .xls is a bad example... I don't think file(1) distinguishes MS Office file types; pretty sure they are all reported as ^\.doc by amavisd. For the hairy details of where the short extension comes from, see $map_full_type_to_short_type_re in the amavisd main file. > Is it always best to always use qr'^\. since that's what amavis > determines no matter what the message says? What you use depends on what you want blocked... Typically the banned file feature is used to block executable content, which file(1) detects pretty reliably. For more specific blocking -- such as blocking .xls while allowing .doc -- you'll need to rely on the attachment name supplied by the sender. > > Thanks for your patience while I wrap my head around this. > > -- Noel Jones
