#En este tutorial se puede ver como buscar dentro de un archivo .zip alguno de los siguientes archivos y bloquear dicho email exe|com|vbs|bat|pif|scr|hta|js|cmd|chm|cpl|jsp|reg|vbe|lnk|dll|sys|btm|dat|msi|prf|vb
#
#Buscar en /etc/exim.conf las lineas de acl_smtp_ y agregar al último la siguiente:
acl_smtp_mime = acl_check_mime
#Buscar las ACL con la cadena "begin acl" luego de begin acl agregar lo siguiente (teniendo en cuenta que la ruta para unzip es /usr/bin/unzip y debe estar instalado para funcionar)
acl_check_mime:
deny message = A .zip attachment contains a Windows-executable file - \
blocked because we are afraid of new viruses \
not recognized [yet] by antiviruses.
condition = ${if match{$mime_filename}{\N(?i)\.zip$\N}}
condition = ${if def:sender_host_address}
!authenticated = *
decode = default
log_message = forbidden binary in attachment: filename=$mime_filename, \
recipients=$recipients
condition = ${if match{${run{/usr/bin/unzip -l \
$mime_decoded_filename}}}\
{\N(?i)\.(exe|com|vbs|bat|pif|scr|hta|js\
|cmd|chm|cpl|jsp|reg|vbe|lnk|dll|sys|btm|dat|msi|prf|vb)\n\N}}
deny message = Windows-executable attachments forbidden because we are \
afraid of new viruses not recognized [yet] by antiviruses.
condition = ${if def:sender_host_address}
!authenticated = *
log_message = forbidden attachment: filename=$mime_filename, \
content-type=$mime_content_type, recipients=$recipients
condition = ${if or{\
{match{$mime_content_type}{(?i)executable}}\
{match{$mime_filename}{\N(?i)\.(exe|com|vbs|bat|pif\
|scr|hta|js|cmd|chm|cpl|jsp|reg|vbe|lnk|dll|sys|btm|dat|msi|prf|vb)$\N}}\
}}
accept
#Salvar los cambios a exim.conf y reiniciar exim con la siguiente linea:
service exim restart
service exim restart