[Mimedefang] Help needed to block all attachments

Kevin A. McGrail KMcGrail at PCCC.com
Wed Nov 21 09:52:35 EST 2012


On 11/21/2012 9:31 AM, Ford,Luckie J wrote:
> I apologize in advance as I am an extreme mimdefang newbie that has installed the product for one purpose, to block ALL attachments from going through the SMTP server.  I see the ability to list specific file extensions to block but that isnt what I am looking for.  I want to block ALL attachments in emails.  Can someone provide specific details as to what needs to be changed and where in the appropriate config files.  I am forever appreciative of any help that can be provided.
Untested but I think you could focus on filter_multipart in the example 
and other than HTML & TXT multiparts, just return action_bounce($reply, 
$code, $dsn).

This might be achieved by changing the bad_exts from $bad_exts = 
'(ade|adp|app|asd|asf|asx|bas|bat|chm|cmd|com|cpl|crt|dll|exe|fxp|hlp|hta|hto|inf|ini|ins|isp|jse?|lib|lnk|mdb|mde|msc|msi|msp|mst|ocx|pcd|pif|prg|reg|scr|sct|sh|shb|shs|sys|url|vb|vbe|vbs|vcs|vxd|wmd|wms|wmz|wsc|wsf|wsh|\{[^\}]+\})' 
to

$bad_exts = ''

But you might need to modify the filter_bad_filename to allow .txt files 
through.  Good luck

Regards,
KAM



More information about the MIMEDefang mailing list