Hugo envío unas posibles configuraciones, las cuales, según mi configuración acá, he ido poniendo o intentando poner, en ni servidor Postfix. Pero cuando habilito algunas de ellas, dejo de recibir correos desde dominios que no son míos o de enviarlos a dominios que no son míos. Las restricciones las he ido habilitando una a una, es decir, habilito y miro trazas, si no hay problemas, pruebo la próxima. Pero tengo problemas en dos de ellas, hasta ahora.
Me pueden dar una mano a saber qué está pasando y si hay soluciones?
Uso CentOS 6. Tengo usuarios locales y además tengo usuarios virtuales (los municipios), que almacenan sus correos en este servidor en cuentas desde donde la recogen luego vía POP3 con sus respectivos servidores de correo y sus dominios. La mensajería que va para fuera de estos municipios (o usuarios virtuales) es enviada a través de mi servidor de correo.
Las opciones para el smtpd_sender_restrictions son: reject_unknown_sender_domain.
La opción para el smtpd_recipient_restrictions es: reject_unknown_recipient_domain.
Cuando habilito el reject_unknown_sender_domain en las restricciones smtpd_sender_restrictions el error que me da Postfix es:
Código: Seleccionar todo
Out: 220 bruji.gtm.onat.gov.cu ESMTP Postfix
 In:  EHLO mx1.onat.gob.cu
 Out: 250-bruji.gtm.onat.gov.cu
 Out: 250-PIPELINING
 Out: 250-SIZE 1013760
 Out: 250-ETRN
 Out: 250-STARTTLS
 Out: 250-AUTH PLAIN LOGIN
 Out: 250-AUTH=PLAIN LOGIN
 Out: 250-ENHANCEDSTATUSCODES
 Out: 250-8BITMIME
 Out: 250 DSN
 In:  MAIL FROM:<aaaa@sertod.cu> SIZE=25183
 Out: 250 2.1.0 Ok
 In:  RCPT TO:<bbbb@gtm.onat.gob.cu> ORCPT=rfc822;bbbb@gtm.onat.gob.cu
 Out: 450 4.1.8 <aaaa@sertod.cu>: Sender address rejected: Domain not found
 In:  DATA
 Out: 554 5.5.1 Error: no valid recipients
 In:  RSET
 Out: 250 2.0.0 Ok
 In:  QUIT
 Out: 221 2.0.0 Bye
Código: Seleccionar todo
 Out: 220 bruji.gtm.onat.gov.cu ESMTP Postfix
 In:  EHLO adrian
 Out: 250-bruji.gtm.onat.gov.cu
 Out: 250-PIPELINING
 Out: 250-SIZE 1013760
 Out: 250-ETRN
 Out: 250-STARTTLS
 Out: 250-AUTH PLAIN LOGIN
 Out: 250-AUTH=PLAIN LOGIN
 Out: 250-ENHANCEDSTATUSCODES
 Out: 250-8BITMIME
 Out: 250 DSN
 In:  AUTH LOGIN
 Out: 334 VXNlcm5hbWU6
 In:  YWxpbmFfbG9wZXo=
 Out: 334 UGFzc3dvcmQ6
 In:  YWxpbmFscg==
 Out: 235 2.7.0 Authentication successful
 In:  MAIL FROM: <cccc@gtm.onat.gob.cu>
 Out: 250 2.1.0 Ok
 In:  RCPT TO: <dddd@scu.onat.gob.cu>
 Out: 450 4.1.2 <dddd@scu.onat.gob.cu>: Recipient address rejected: Domain not found
 In:  QUIT
 Out: 221 2.0.0 Bye
Código: Seleccionar todo
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
myhostname = bruji.gtm.onat.gov.cu
mydomain = gtm.onat.gob.cu
myorigin = $mydomain
inet_interfaces = all
inet_protocols = ipv4
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain
local_recipient_maps = unix:passwd.byname $alias_maps
unknown_local_recipient_reject_code = 550
mynetworks = hash:/etc/postfix/network_table
relay_domains = $mydestination
relayhost = [xxx.xx.x.xx]
virtual_alias_domains = hash:/etc/postfix/dominio_virtual
virtual_alias_maps = hash:/etc/postfix/virtual
transport_maps = hash:/etc/postfix/transport
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
recipient_delimiter = +
mail_spool_directory = /var/spool/mail
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_loglevel = 3
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database =
        	btree:/var/lib/postfix/smtp_tls_session_cache
smtp_use_tls = yes
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/newcert.pem
smtpd_tls_key_file = /etc/postfix/newreq.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database =
        	btree:/var/lib/postfix/smtpd_tls_session_cache
tls_random_source = dev:/dev/urandom
smtpd_tls_security_level = may
#
#
[color=#FF0000]
smtpd_helo_required = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes
disable_vrfy_command = yes
smtpd_delay_reject = yes
smtpd_restriction_classes = 
    internacional, nacional
smtpd_helo_restrictions = reject_invalid_helo_hostname
smtpd_sender_restrictions = 
    permit_mynetworks
    reject_non_fqdn_sender
    #reject_unknown_sender_domain
    permit_sasl_authenticated
    reject_non_fqdn_helo_hostname
    #reject_unknown_helo_hostname
    #reject_unknown_client_hostname
    #reject_sender_login_mismatch
smtpd_recipient_restrictions = 
    permit_mynetworks    
    reject_non_fqdn_recipient
    #reject_unknown_recipient_domain
    permit_auth_destination
    permit_sasl_authenticated
    reject_unauth_destination
    check_sender_access
    hash:/etc/postfix/usuarios
    reject
internacional = 
    permit
nacional = 
    check_recipient_access
    regexp:/etc/postfix/filtro
[/color]
#
#
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/header_checks
smtpd_banner = $myhostname ESMTP $mail_name
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10
debug_peer_level = 2
debug_peer_list = 127.0.0.1
debugger_command =
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	 ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
message_size_limit = 1013760
always_bcc = eyes
recipient_bcc_maps = hash:/etc/postfix/eyes_entrantes
sender_bcc_maps = hash:/etc/postfix/eyes_salientes
notify_classes = bounce, delay, policy, protocol, resource, software
allow_percent_hack = no
append_dot_mydomain = no
append_at_myorigin = no
swap_bangpath = no
mailbox_size_limit = 5120000000