En realidad soy nuevo en Linux y no se dar con muchas cosas, el postfix que
tengo instalado tiene el en main.cf tiene esto y creo que no es la version
2.
# JUNK MAIL CONTROLS
#
# The controls listed here are only a very small subset. See the file
# sample-smtpd.cf for an elaborate list of anti-UCE controls.
# The header_checks parameter specifies an optional table with patterns
# that each logical message header is matched against, including
# headers that span multiple physical lines. Patterns are matched
# in the specified order, and the search stops upon the first match.
# When a pattern matches, what happens next depends on the associated
# action that is specified in the right-hand side of the table:
#
# REJECT the entire message is rejected.
# REJECT text.... The text is sent to the originator.
# IGNORE the header line is silently discarded.
# WARN the header is logged (not rejected) with a warning message.
# WARN text... as above, and the text is logged, too.
#
# These patterns do not apply to MIME headers in the message body.
#
# See also the body_checks example in the sample-filter.cf file.
#
header_checks = hash:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks
#body_checks = hash:/etc/postfix/body_checks
----- Original Message -----
From: "Carlos E. R."
es en el fichero " body_checks " en la carpeta ./etc/postfix y en el fichero main.cf se activa " body_checks = regexp:/etc/postfix/body_checks
Ajá. Y la regla que has puesto era: /name ?="?.*\.(bat|com|dll|exe|hta|pif|vbs)"?/ REJECT No me gusta. Se supone que estas buscando rechazar los ejecutables de windows, ¿no? Yo no tengo activado body_checks, sino header_checks. Es más rápido, y funciona muy bien. Antiguamente si había que usar body_checks, pero desde la versión 2.0 me parece que era ya no es necesario: # [Feature 20020527] Postfix now has three classes of header patterns: # header_checks (for primary message headers except MIME headers), # mime_header_checks (for MIME headers), and nested_header_checks # (for headers of attached email messages except MIME headers). By # default, all headers are matched with header_checks. Y (especialmente el segundo párrafo): # The header_checks parameter specifies an optional table with patterns # that each logical message header is matched against, including # headers that span multiple physical lines. # # By default, these patterns also apply to MIME headers and to the # headers of attached messages. With older Postfix versions, MIME and # attached message headers were treated as body text. Yo tengo: header_checks = pcre:/etc/postfix/header_checks Y aquí tengo dos reglas (que ya no uso): #/(filename|name)=".*\.(asd|chm|exe|doc|dll|hlp|hta|js|ocx|pif)"/ REJECT #/(filename|name)=".*\.(scr|pif|exe|com|bat)"/ REJECT "*** DOS/WIN executables rejected ***" Funcionan bien. La de arriba es la que leí de algún sitio, creo que en SLE o en los ejemplos del postfix. La de abajo es mi modificación. Y ahora te pongo la que uso actualmente - que no es mia, sino de Arjen de Korte (SLE, 18 Feb 2004) - y es la que me hizo usar 'pcre' en vez de 'regexp': /^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.( 386|ba[st]|bin|c[ho]m|cmd|cpl|dll|drv|exe|hlp|hta| in[fis]|isp|js|jse|lnk|ms[cipt]|ocx|pif|reg|sc[rt]| sh[bs]|sys|url|vb|vb[es]|vxd|ws[cfh]))"?\s*$/ REJECT Attachment file type "$3" not allowed ("$2") El mensaje de reject original era: # REJECT Attachment file type not allowed ("$2" has the extension ".$3") pero lo cambié, era demasiado extenso. Fíjate que eso rechaza un montón de extensiones ejecutables. Por cierto, si usas fetchmail para recoger el correo, tendrás que usar además otros trucos para evitar que el fetchmail genere un mensaje de rechazo. Si es tu caso, lo cuento. -- Saludos Carlos Robinson -- Para dar de baja la suscripción, mande un mensaje a: suse-linux-s-unsubscribe@suse.com Para obtener el resto de direcciones-comando, mande un mensaje a: suse-linux-s-help@suse.com