[exim] inverse mime checking

Top Page
Delete this message
Reply to this message
Author: Brent Clark
Date:  
To: Exim User's Mailing List
Subject: [exim] inverse mime checking
Hi all

I have the following ruleset


# File extension filtering.
deny   set acl_m1 = ${extract{-1}{.}{${lc:$mime_filename}}}
message  = This message contains a prohibited file extension ($acl_m1)
log_message     = REJECTED ATTACHMENT ($acl_m1)
condition       = ${if match{$acl_m1}{\N^(avi|asf|ade|adp|asx|asp|arj|\
                                         bat|bin|btm|bas|\
                                         cpl|com|cmd|class|cab|chm|crt|\
                                         dll|\
                                         exe|\
                                         gz|\
                                         hta|hlp|html|htm\
                                         js|jse|java|jtd|\
                                         mpeg|mp3|mpg|mda|mdb|mde|mdt|mdw|mdz|msc|msi|msp|mst|\
                                         ole|ocx|oft|ovl|ops|\
                                         prf|plx|pcd|prf|pub|pif|pl|php|pst|\
                                         reg|\
                                         shs|scr|pif|sys|shb|scf|sct|shtml|\
                                         tar|\
                                         rar|\
                                         url|\
                                         vb|vbs|vbe|vxd|vss|vst|vob|\
                                         wav|wsf|wsc|wma|wsh|ws|wsf|pps|ppt|zip\
                                         )$\N}{1}{0}}


Would anyone know how I can get the inverse check of this.

Instead of checking for list of denied mime types, Id rather your like to have a list of accepted mimes types (doc,
xls, pdf, etc), kinda like iptables policy of DROP, and then ACCEPT what you want.

Kind Regards

Brent Clark