I have had enough of spam coming to my server with Microsoft Office attachments. No one I care about ever sends me Microsoft Office documents so I would like to reject (with a polite message) all email with Microsoft Office documents attached.
I tried this:
# Reject messages that have serious MIME errors.
#
deny
message = Serious MIME defect detected ($demime_reason)
demime = *
condition = ${if >{$demime_errorlevel}{2}{1}{0}}
# Unpack MIME containers and reject file extensions used by worms.
# This calls the demime condition again, but it will return cached results.
# Note that the extension list may be incomplete.
#
deny
message = We do not accept ".$found_extension" attachments here.
demime = bat:btm:cmd:com:cpl:dll:exe:lnk:msi:pif:prf:reg:scr:vbs:url
I get this error: cannot test demime condition in RCPT ACL
.