Aqui te dejo como funciona en nuestros servidores.Compara con los
tuyos.

======================
...
#--- VALIDANDO LAS ENTRADAS Y SALIDAS NACIONALES E INTERNACIONALES
nacional_out = check_recipient_access
regexp:/etc/postfix/reglas/filtro_nac, rejectnacional_in =
check_sender_access regexp:/etc/postfix/reglas/filtro_nac,
rejectinternacional = permit
smtpd_sender_restrictions =...   check_recipient_access
hash:/etc/postfix/reglas/usuarios_in...

smtpd_recipient_restrictions =...   check_sender_access
hash:/etc/postfix/reglas/usuarios_out...


CONTENIDO DE ARCHIVOS:
----- filtro_nac
/^([fF]rom:(\s*|=))?<>$/        RELAY/\@*\.cu$/      RELAY/^\@/   REJEC
T 550 El formato de la direccion electronica no es
valido/[!%\@].*\@/    REJECT 550 Formato de direccion electronica
incorrecto./\@*/   REJECT 550 Su cuenta de correo no esta autorizada a
enviar ni recibir de dominios internacionales.


----- usuarios_in
#--- ENTRADA NACIONALmidominio                 nacional_in



----- usuarios_ou
#--- SALIDA internacionalful...@midominio.cu      internacionalpepe@mid
ominio.cu        internacional
#--- SALIDA NACIONALmidominio.cu                 nacional_out



======================

Saludos,

El jue, 13-08-2020 a las 20:13 +0000, informat...@atcomercialcentro.co.
cu escribió:
> Colegas estoy montando un servidor de correo en postfix en debian 10
> y comoes logico debo de ponerle las restricciones asalina nacional e
> internacional. el caso es que no he logrado restringir el usuario que
> tengo hecho de prueba el cual es el que quiero que tenga salida
> nacional nada mas. aqui les adjunto mi configuracion de main.cf por
> si pueden hecharme una manito. 
> de antemano muchas gracias 
> # See /usr/share/postfix/main.cf.dist for a commented, more complete
> version
> 
> # Debian specific:  Specifying a file name will cause the first
> # line of that file to be used as the name.  The Debian default
> # is /etc/mailname.
> #myorigin = /etc/mailname
> 
> smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
> biff = no
> 
> # appending .domain is the MUA's job.
> 
> # Backguard compatibility
> # Prohibir direcciones de correo sin dominio
> append_dot_mydomain = no
> 
> # Uncomment the next line to generate "delayed mail" warnings
> # Enviar alertas sobre correo demorado
> delay_warning_time = 4h
> smtpd_error_sleep_time = 1s
> 
> readme_directory = no
> 
> # Plantilla personalizada para correos de error
> bounce_template_file = /etc/postfix/warn/bounce.msg
> 
> # See http://www.postfix.org/COMPATIBILITY_README.html -- default to
> 2 on
> # fresh installs.
> 
> # Backguard compatibility, mandatory for Postfix 3
> #compatibilizando expresiones de Postfix 2 con Postfix 3[OBLIGATORIO]
> compatibility_level = 2
> 
> # TLS parameters
> smtpd_tls_cert_file = /etc/ssl/certs/server.crt
> smtpd_tls_key_file = /etc/ssl/private/server.key
> smtpd_use_tls=yes
> smtpd_tls_session_cache_database =
> btree:${data_directory}/smtpd_scache
> smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
> 
> # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package
> for
> # information on enabling SSL in the smtp client.
> 
> smtpd_relay_restrictions = permit_mynetworks
> permit_sasl_authenticated defer_unauth_destination
> myhostname = atcomercialcentro.co.cu
> 
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
> 
> # Declarar el dominio del cual proviene y al cual se entrega el
> correo
> myorigin = /etc/mailname
> 
> # Declarar destino para el transporte local (mensajes locales y del
> mailserver)
> mydestination = $myhostname, atcomercialcentro.co.cu,
> server.atcomercialcentro.co.cu, localhost.atcomercialcentro.co.cu,
> localhost
> 
> ###################################################
> # Configuraciones del relayhost[ESPECIFICO]
> ###################################################
> 
> # No se utiliza otro MTA intermedio para enviar el correo
> relayhost = correo.gaviota.cu
> 
> # A menos que realmente se haga de relayhost para otros MTAs,
> restringir la red
> # de confianza a las direcciones loopback
> mynetworks =  127.0.0.0/8 10.12.143.0/24 10.12.142.8/29
> [::ffff:127.0.0.0]/104 [::1]/128
> 
> ### Maximum mailbox size (0 = unlimited - is already limited by
> Dovecot quota)
> mailbox_size_limit = 0
> message_size_limit = 1572864
> 
> # 1MB -&gt; 1048576
> # 1.5MB -&gt; 1572864
>  
> # Máximo de destinatarios en un mensaje
> #default_destination_recipient_limit = 20
> 
> # Delimitador de destinatarios
> recipient_delimiter = +
> 
> # Interfaces para escuchar peticiones
> inet_interfaces = all
> 
> # Protocolos a utilizar
> inet_protocols = ipv4
> # all -&gt; for ipv4 &amp; ipv6
> 
> #SMTP-AUTH Dovecot
> 
> home_mailbox = Maildir/
> smtpd_sasl_type = dovecot
> smtpd_sasl_path = private/auth
> smtpd_sasl_local_domain =
> smtpd_sasl_security_options = noanonymous
> broken_sasl_auth_clients = yes
> smtpd_sasl_auth_enable = yes
> smtpd_recipient_restrictions =
> permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
> smtp_tls_security_level = may
> smtpd_tls_security_level = may
> smtp_tls_note_starttls_offer = yes
> smtpd_tls_loglevel = 1
> smtpd_tls_received_header = yes 
> 
> # RESTRICCIONES PARA LOS USUARIOS
> smtpd_recipient_restrictions =
>       permit_mynetworks
>       permit_sasl_authenticated
>       reject_unauth_destination
>       permit
> 
> smtpd_restriction_classes  =
>          intern
>        nac_in
>        nac_out
>                                 
> smtpd_sender_restrictions =
>        check_recipient_access hash:/etc/postfix/usuarios_in
>        reject_non_fqdn_sender
>        reject_unknown_sender_domain permit
> 
>       smtpd_recipient_restrictions =
>        permit_auth_destination
>        check_sender_access hash:/etc/postfix/usuarios_out
>        permit_mynetworks
>        reject_non_fqdn_recipient
>        reject_unknown_recipient_domain
>        reject_unauth_destination
> 
> intern =
>        permit
>          
> nac_out  =
>           check_recipient_access regexp:/etc/postfix/filtro_nac
>           reject
> 
> nac_in =
>           check_sender_access regexp:/etc/postfix/filtro_nac
>           reject
> 
> smtpd_data_restrictions = reject_unauth_pipelining
> 
> # PARA HECER CONTROL DE LA MENSAJERIA ENTRANTE Y SALIENTE 
> always_bcc = sal...@atcomercialcentro.co.cu
> sender_bcc_maps = hash:/etc/postfix/sender
> recipient_bcc_maps = hash:/etc/postfix/recipient
> luser_relay = root
> ##readme_directory = /usr/share/doc/postfix
> html_directory = /usr/share/doc/postfix/html
> _______________________________________________
> Gutl-l mailing list -- gutl-l@listas.jovenclub.cu
> To unsubscribe send an email to gutl-l-le...@listas.jovenclub.cu
-- 

Lic. Alexis Verano GonzálezEsp. A Ciencias Informáticas | Administrador de 
REDGrupo Empresarial de Servicios de Transporte Automotor "GEA"Ministerio de 
TransporteCorreo-e: alexis.verano@gea.transnet.cuTel: (+53) 7881-9057
_______________________________________________
Gutl-l mailing list -- gutl-l@listas.jovenclub.cu
To unsubscribe send an email to gutl-l-le...@listas.jovenclub.cu

Responder a