• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Emails not arriving between two domains

RobertoM

New Pleskian
Trying to fixing a problem while sending emails betweet two domains I got a special case, if I send emails from anyuser@domain_a.com to anyuser@domain_b.com the emails are not received.

From anyuser@domain_a.com to anyotherdomain.com works

Both domains are hosted In the same saver but the email service (only this service) of the @domain_b.com is not in the same server

Looking on /usr/local/psa/var/log/maillog with the actual configuration If I try to send emails from anyuser@domain_a.com to anyuser@domain_b.com I find:

Mar 5 12:04:00 llwi889 courier-imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 5 12:04:00 llwi889 courier-imapd: LOGIN, user=anyuser@domain_a.com, ip=[::ffff:127.0.0.1], port=[58072], protocol=IMAP
Mar 5 12:04:00 llwi889 postfix-local[10489]: postfix-local: from=anyuser@domain_a.com, to=anyuser@domain_b.com, dirname=/var/qmail/mailnames
Mar 5 12:04:00 llwi889 postfix/smtpd[6758]: disconnect from localhost[127.0.0.1]
Mar 5 12:04:00 llwi889 courier-imapd: LOGOUT, user=anyuser@domain_a.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=454, sent=274, time=0
Mar 5 12:04:01 llwi889 postfix/pipe[10487]: 7A1C81580076: to=<anyuser@domain_b.com>, relay=plesk_virtual, delay=0.57, delays=0.26/0.01/0/0.29, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Mar 5 12:04:01 llwi889 postfix/qmgr[32383]: 7A1C81580076: removed




I read somewhere that commenting the next 3 lines fix the problem, I did it and anyuser@domain_a.com CAN send emails to anyuser@domain_b.com BUT with this config anyuser@domain_b.com CAN NOT send emails to anyuser@domain_a.com

/etc/postfix/main.cf
#virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
#virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
#virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox

looking on /usr/local/psa/var/log/maillog with this commenting this lines
Mar 5 12:05:42 llwi889 courier-imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 5 12:05:42 llwi889 courier-imapd: LOGIN, user=anyuser@domain_a.com, ip=[::ffff:127.0.0.1], port=[58188], protocol=IMAP
Mar 5 12:05:42 llwi889 postfix/smtpd[15042]: disconnect from localhost[127.0.0.1]
Mar 5 12:05:42 llwi889 courier-imapd: LOGOUT, user=anyuser@domain_a.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=454, sent=274, time=0
Mar 5 12:05:42 llwi889 postfix/smtp[14551]: 6B5EB158017D: to=<anyuser@domain_b.com>, relay=mx.serviciodecorreo.es[82.223.190.100]:25, delay=0.53, delays=0.19/0/0.05/0.28, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as E7830E40)
Mar 5 12:05:42 llwi889 postfix/qmgr[14547]: 6B5EB158017D: removed





This is my /etc/postfix/main.cf

# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/postfix-2.11.5/README_FILES
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox
transport_maps = , hash:/var/spool/postfix/plesk/transport
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_security_level = may
smtpd_use_tls = yes
smtp_tls_security_level = may
smtp_use_tls = no
smtpd_timeout = 3600s
smtpd_proxy_timeout = 3600s
disable_vrfy_command = yes
mynetworks =
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated
smtp_send_xforward_command = yes
smtpd_authorized_xforward_hosts = 127.0.0.0/8 [::1]/128
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
virtual_mailbox_base = /var/qmail/mailnames
virtual_uid_maps = static:30
virtual_gid_maps = static:31
smtpd_milters = inet:127.0.0.1:12768
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
virtual_transport = plesk_virtual
plesk_virtual_destination_recipient_limit = 1
mailman_destination_recipient_limit = 1
mailbox_size_limit = 0
virtual_mailbox_limit = 0
myhostname = llwi889.servidoresdns.net
message_size_limit = 104857600
non_smtpd_milters =
smtpd_tls_ciphers = medium
smtpd_tls_mandatory_ciphers = medium
tls_medium_cipherlist = HIGH:!aNULL:!MD5
smtpd_tls_mandatory_protocols = TLSv1 TLSv1.1 TLSv1.2
smtpd_tls_protocols = TLSv1 TLSv1.1 TLSv1.2



Plesk Onyx Versión 17.5.3 Actualización #42
CentOS 6.9 (Final)‬
 
Have you tried to just repair the mail configuration on the server?

# plesk repair mail

Plesk Repair Utility: Mail

Hi Mark, thank you, now I did it and this is the result, then I test send emails and it still not sending emails.

Repairing the mail server configuration

Reconfigure all domains and mailboxes? [Y/n] Y
Reconfiguring all domains and mailboxes ......................... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0
 
It is probably sending mails, but it is sending them locally, because both domains are listed on the local server. External SMTP servers are not looked up if the domain is running on the local host.
 
Back
Top