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 -> 1048576
# 1.5MB -> 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 -> for ipv4 & 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

Responder a