3

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 206.225.87.101 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 206.225.87.101 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 =
     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.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 = 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
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

;; QUESTION SECTION:
;gencom.us.                     IN      MX

;; ANSWER SECTION:
gencom.us.              3600    IN      MX      10 gencom-   us.mail.protection.outlook.com.

;; Query time: 61 msec
;; SERVER: 69.64.66.11#53(69.64.66.11)
;; 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:206.225.87.101

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[207.46.163.138]: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[207.46.163.138]: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

Thanks!

1 Answers1

2

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:206.225.87.101

and run postmap the_problematic_file should solves your problem.

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
  • I believe that did it but now i am getting a certificate verification failed error.. Added updated log to end of op. – Xenocide122 Aug 03 '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](http://serverfault.com/questions/ask) so we can focus to specific problem per question. And don't forget to [mark this answer as accepted](http://serverfault.com/help/someone-answers) if it was helpful for you :) – masegaloeh Aug 03 '15 at 15:00