Blocking attachments ending in "\.com$", but then not

Noel Jones via amavis-users amavis-users at amavis.org
Thu Feb 6 16:04:05 CET 2014


On 2/6/2014 2:27 AM, Ralf Hildebrandt via amavis-users wrote:
> From a banned mail:
> 
> X-Amavis-Alert: BANNED, message contains text/html,.asc,cid: CE5AA0D295C27C4EB1C00217FC096FED at sanofi.com
> 
> Is it somehow possible to block .*\.com attachments, while allowing
> the stuff blockend above through?
> 


I can't remember the last time I got an actual .com attachment, so I
removed |com| from the $banned_filename_re big extension list, and
added the line
  qr'^\.com$',     # block .com file(1) type
as a safety net.

As an alternative, I suppose you could do something like (untested)
   [ qr'\S@\S+\.com$' => 0 ],
just above the big list.

Or some combination of the above ideas. First match wins.


I expect the newer $banned_namepath_re can do this more elegantly,
but I never bothered to figure out the syntax.




  -- Noel Jones


More information about the amavis-users mailing list