Diferencia entre revisiones de «Instalar servidor de correo»

De Wiki de BandaAncha.eu
Saltar a: navegación, buscar
Línea 32: Línea 32:
  
 
  myhostname = levitico.vectrice.com
 
  myhostname = levitico.vectrice.com
 +
 +
==Rechazar emails con adjuntos peligrosos==
 +
 +
Creamos /etc/postfix/body_checks con el siguiente contenido:
 +
 +
/^((Content-(Disposition: attachment;|Type:).*|\ +)| *)(file)?name\ *=\ *"?.*\.(lnk|asd|hlp|ocx|reg|bat|c[ho]m|cmd|exe|dll|vxd|pif|scr|hta|jse?|sh[mbs]|vb[esx]|ws[fh]|wmf)"?\ *$/      REJECT  attachment type not allowed
 +
 +
Editamos /etc/postfix/main.cf y añadimos:
 +
 +
mime_header_checks = pcre:/etc/postfix/body_checks
  
 
====
 
====

Revisión del 13:37 8 mar 2007

Cercionarse de que:

Nuestro hostname esta bien configurado

Desinstalación de sendmail

yum remove sendmail
Removed: sendmail.i386 0:8.13.1-3.RHEL4.5
Dependency Removed: mdadm.i386 0:1.6.0-3 redhat-lsb.i386 0:3.0-8.EL


cyrus-sasl
cyrus-sasl-md5
cyrus-sasl-plain
yum install postfix
yum install cyrus-imapd

Los ficheros de configuración de Postfix están en /etc/postfix y los mas importantes son

/etc/postfix/main.cf
/etc/postfix/master.cf

después de cualquier modificación de estos hay que reiniciar postfix

postfix reload

La cola se almacena en /var/spool/postfix

Configuración

Edito /etc/postfix/main.cf y modifico las siguientes líneas

myhostname = levitico.vectrice.com

Rechazar emails con adjuntos peligrosos

Creamos /etc/postfix/body_checks con el siguiente contenido:

/^((Content-(Disposition: attachment;|Type:).*|\ +)| *)(file)?name\ *=\ *"?.*\.(lnk|asd|hlp|ocx|reg|bat|c[ho]m|cmd|exe|dll|vxd|pif|scr|hta|jse?|sh[mbs]|vb[esx]|ws[fh]|wmf)"?\ *$/ REJECT attachment type not allowed

Editamos /etc/postfix/main.cf y añadimos:

mime_header_checks = pcre:/etc/postfix/body_checks

==

smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = 
       permit_mynetworks permit_sasl_authenticated