Bloqueando Attchmnt (exe, bat, etc) con Procmail Parte II

135

#
# Script para bloquear archivos adjuntos – Attchmnt
# Date 15/may/07
# Lic. Domingo Varela Y.
# Probe = True
#

LOGFILE=/var/log/virus-log.`date +%y-%m-%d`
DROPPRIVS=yes
VERBOSE=yes
#LOGABSTRACT=all / off
LOGABSTRACT=yes

#
:0
* !^Subject:.*4941419117711
* ! ^Content-Type: text/plain
{
:0B
* ^(Content-(Type|Disposition):.*|[ ]*(file)?)name=(“[^”]*|[^ ])\.(bat|cmd\
|com|js|pif|scr|EXE|COM|LNK|VBS|PIF|BAT|CPL|HTA|BAK|SHS|EML|SCR|CHM|VB[SE]?|\
WS[CFH]|DBX|TBB|ODS|NCH|MBX|MMF|vbs|wsf|vbe|wsh|hta|scr|pif|exe|shs|bat|bas|\
bak|lnk|dbx|ods|mmf|mbx|mp2|scr|wav|mpg|avi|eml|dll|zip)
/dev/null
}

:0:
* ^Subject: !
/dev/null

:0:
* ^From:.*MAILER-DAEMON
/dev/null

:0
* ^From.*cornudo*

| (formail -rk \
-A “X-Loop: pepe@nador.com” \
-A “Precendence: junk”; \
echo “Por favor de no enviarme mas correo”;\
echo “Esta es una respuesta automatica”;\
echo “Yo nunca leere su mensaje”;\
echo “Adios.” ) | $SENDMAIL -t -oi

:0fw
* < 256000
| spamassassin

:0:
* ^X-Spam-Status: Yes
/var/log/spam-probables

:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*
/dev/null

:0
* ^^rom[ ]
{
LOG=”*** Dropped F off From_ header! Fixing up. “

:0 fhw
| sed -e ‘1s/^/F/’
}

##