[exim] blocking executable attachments

Pàgina inicial
Delete this message
Reply to this message
Autor: Peter Velan
Data:  
A: Exim Users Mailing List
Assumpte: [exim] blocking executable attachments
Exim version 4.52 #1 built 02-Jul-2005 06:14:22
Support for: iconv() IPv6 PAM Perl GnuTLS Content_Scanning Old_Demime

Hello,

to prevent messages with "bad" attachments, I have the following in my
config:

---
deny message = Attachments of type ".$found_extension" not allowed
demime = bat : cmd : com : exe : lnk : pif : scr
logwrite = :main,reject: bad atachment ($found_extension).
---

This works very well; now I would like to do it the "modern way", like:

---
deny message = Attachments of type ".$found_extension" not allowed
condition = ${if match \
{${lc:$mime_filename}} \
{\N\.(bat|cmd|com|exe|lnk|pif|scr)$\N} \
{yes} {no} \
}
logwrite = :main,reject: bad atachment ($found_extension).
---

The "modern way" doesn't works for me: messages with "bad" attachments
are accepted now.

What I'm doing wrong?

Peter