I have plesk setup on a server with multiple domains already living and breathing, including email which all works fine. My issue comes in with a new domain I added that is using exchange for the email instead of the local postfix. So I deactivated postfix for this "gencom.us" in plesk but anytime the website tries to send an email (PHP Contact form) I never get the test emails (despite the form reporting success).

Here are the errors I get in my maillog:

Jul 30 08:00:19 pacobob postfix/pickup[22664]: 15F972500E30: uid=10000 from=<gencom-cp@gencom.us>
Jul 30 08:00:19 pacobob postfix/cleanup[22750]: 15F972500E30: message-id=<2a5a73f7a4b3e9369f8815b43b4a1b2c@www.gencom.us>
Jul 30 08:00:19 pacobob postfix/qmgr[22665]: 15F972500E30: from=<gencom-cp@gencom.us>, size=836, nrcpt=1 (queue active)
Jul 30 08:00:19 pacobob postfix/smtp[22852]: 15F972500E30: to=<fgomez@gencom.us>, relay=none, delay=0.09, delays=0.08/0.01/0/0, dsn=5.4.6, status=bounced (mail for loops back to myself)
Jul 30 08:00:19 pacobob postfix/cleanup[22750]: 2EB332500EEF: message-id=<20150730150019.2EB332500EEF@pacobob.com>
Jul 30 08:00:19 pacobob postfix/bounce[22853]: 15F972500E30: sender non-delivery notification: 2EB332500EEF
Jul 30 08:00:19 pacobob postfix/qmgr[22665]: 2EB332500EEF: from=<>, size=2630, nrcpt=1 (queue active)
Jul 30 08:00:19 pacobob postfix/qmgr[22665]: 15F972500E30: removed
Jul 30 08:00:19 pacobob postfix/smtp[22852]: 2EB332500EEF: to=<gencom-cp@gencom.us>, relay=none, delay=0.03, delays=0.03/0/0/0, dsn=5.4.6, status=bounced (mail for loops back to myself)
Jul 30 08:00:19 pacobob postfix/qmgr[22665]: 2EB332500EEF: removed
Jul 30 08:00:19 pacobob plesk_saslauthd[22790]: activity on 0 channel(s)
Jul 30 08:00:19 pacobob plesk_saslauthd[22790]: select timeout, exiting

And here is my main.cf

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = all
inet_protocols = all
mydestination = localhost.$mydomain, localhost, localhost.localdomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
        mail.$mydomain, www.$mydomain, ftp.$mydomain
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
     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.8.17/samples
readme_directory = /usr/share/doc/postfix-2.8.17/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, hash:/etc/postfix/virtual_mailbox_maps
virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox
transport_maps = hash:/etc/postfix/transport, 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 =
relayhost =
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated, permit
smtpd_client_restrictions =
smtp_send_xforward_command = yes
smtpd_authorized_xforward_hosts = [::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:
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
mydestination = pacobob.com
message_size_limit = 31457280

Any help would be appreciated, this is a default plesk setup (12.0.18 Update #57) running on CentOS 6.6. And all other email, webmail, smtp settings seem to work for all other servers, it is just this one that has Exchange. I did make sure all my DNS settings were correct in plesk as well as in my server portal through codero hosting. I know the exchange settings are working as everyone gets their emails I just can't send emails from the domain out to the exchange server.

Here is the results of "dig gencom.us mx"

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.1 <<>> gencom.us mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50128
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;gencom.us.                     IN      MX

gencom.us.              3600    IN      MX      10 gencom-   us.mail.protection.outlook.com.

;; Query time: 61 msec
;; WHEN: Sat Aug  1 07:01:30 2015
;; MSG SIZE  rcvd: 80

Contents of my /etc/postfix/transport and /var/spool/postfix/plesk/transport

gencom.us smtp:

Updated log

Aug  3 07:24:55 pacobob plesk sendmail[21126]: handlers_stderr: SKIP
Aug  3 07:24:55 pacobob plesk sendmail[21126]: SKIP during call 'check-quota' handler
Aug  3 07:24:55 pacobob postfix/pickup[21037]: 41AAC2500EFA: uid=10000 from=<gencom-cp@gencom.us>
Aug  3 07:24:55 pacobob postfix/cleanup[21132]: 41AAC2500EFA: message-id=<e158524b918d039c7b8e5a5170d5cab1@www.gencom.us>
Aug  3 07:24:55 pacobob postfix/qmgr[21036]: 41AAC2500EFA: from=<gencom-cp@gencom.us>, size=864, nrcpt=1 (queue active)
Aug  3 07:25:00 pacobob postfix/smtp[21134]: certificate verification failed for gencom-us.mail.protection.outlook.com[]:25: untrusted issuer /C=IE/O=Baltimore/OU=CyberTrust/CN=Baltimore CyberTrust Root
Aug  3 07:25:02 pacobob postfix/smtp[21134]: 41AAC2500EFA: to=<fgomez@gencom.us>, relay=gencom-us.mail.protection.outlook.com[]:25, delay=7.2, delays=0.11/0.02/5.7/1.4, dsn=2.6.0, status=sent (250 2.6.0 <e158524b918d039c7b8e5a5170d5cab1@www.gencom.us> [InternalId=17721035066256, Hostname=DM2PR12MB0187.namprd12.prod.outlook.com] Queued mail for delivery)
Aug  3 07:25:02 pacobob postfix/qmgr[21036]: 41AAC2500EFA: removed


  • Did you change the MX records? – Michael Hampton Jul 31 '15 at 14:09
  • In plesk as well as in my control panel on my host i had added the MX record fro exchange email to work. Emails coming from outside the server make it to everyone but not from ones inside the server. – Xenocide122 Jul 31 '15 at 15:56
  • I think you will need to disclose the real domain name to sort this out. – Michael Hampton Jul 31 '15 at 15:57
  • Sure thing. The real domain name is gencom.us – Xenocide122 Jul 31 '15 at 16:25
  • 1
    Strange. Are you running split DNS? – Michael Hampton Jul 31 '15 at 16:59

Let me quote the other excellent answer by James Sneeringer from the other question:mail loops back to myself | postfix

This happens when domain.com has an MX record (or, in the absence of an MX, an A record) that points to your Postfix server, but your Postfix server is not configured to accept mail for that domain.

From the quote above, basically there are two conditions that can make this error happen

  1. Postfix receive email with its recipient address wasn't listed as local domains, so postfix should relay those email
  2. Postfix routing engine was decide that an email should be relayed to same postfix instance

To fix this error we must fix one of possible cause above.

  • First problem can happen if you forgot to introduce the domain to postfix after pointing it via MX record. We need to insert the domain as the local one so postfix shouldn't relayed the email. The domain can be listed in mydestination, virtual_mailbox_domains or virtual_alias_domains.
  • Second problem can happen if you already remove the domain from postfix local domain but forgot to change the MX record (or A record if MX wasn't available). In this case postfix will relay the email into itself and complain with above error. The solution is change A or MX record. Or perhaps postfix was configured to use /etc/hosts, then you should checks this file too.
  • The second problem can also happen if you override mail routing via DNS mechanism with postfix internal routing. Common parameter to configuring mail static routing was transport_maps. Check if you put the address on those maps and delete if it exists.

From the description of your problem, looks like the culprit here was postfix transport_maps parameter. Your DNS record was fine and you states that the domain should be handled somewhere besides postfix. Removing this entry

gencom.us smtp:

and run postmap the_problematic_file should solves your problem.

  • I believe that did it but now i am getting a certificate verification failed error.. Added updated log to end of op. – Xenocide122 Aug 3 '15 at 14:26
  • That's just warning from postfix, you can ignore it. Your postfix was run as intended now. Anyway, if you want to get rid of the error, feel free to ask New Question so we can focus to specific problem per question. And don't forget to mark this answer as accepted if it was helpful for you :) – masegaloeh Aug 3 '15 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.