Jump to content
Unixfy

"The email failed to send due to a configuration issue." when sending emails from root domain?

Recommended Posts

Hi,

I am having an issue with Blesta where emails will fail to send if the From address is specified as the root domain. For example (assuming that the Blesta installation URL is my.example.com):

  • From address ends in my.example.com (Blesta Installation URL): Success
  • From address ends in 1234587421abcdefg.example.com (nonexistent subdomain): Success
  • From address ends in example.com (root domain): Fails with "The email failed to send due to a configuration issue."
Why is this happening, and how can it be corrected?
 
Thanks!

Share this post


Link to post
Share on other sites

Are you using PHP Mail or SMTP? (Settings > Company > Emails > Mail Settings)

If using PHP, I'd suggest trying SMTP.

Possible reasons could be a bad mail server configuration, DKIM/SPF records that are not friendly. Do you have access to your mail server logs? If so, what does that show?

Share this post


Link to post
Share on other sites

I'm using SMTP, but the same issue occurs with PHP.

My email is hosted at MXroute, a reputable provider that I've never had problems with (on other applications, and on a different install of Blesta on a different domain). I'll go get DKIM and SPF setup - I only have an SPF record, no DKIM. As the mail is hosted at an external provider (MXroute uses cPanel and has mail log viewing disabled as far as I know), I'm not able to see the mail server logs. 

Share this post


Link to post
Share on other sites

If email at those sub-domains work, but not the root domain, and both instances you were using MXroute, I think we can assume that the connection details are correct. I think we can also assume that it's likely MXroute is rejecting the email. Do they provide logs in their panel? Some do, like Mailgun.

You can do a simple test by signing up for a free Mailgun account - https://www.mailgun.com, they allow something like 12k emails/month for free.

Your Blesta settings would be something like:

Delivery Method: SMTP
SMTP Security: TLS
SMTP Host: smtp.mailgun.org
SMTP Port: 587
SMTP User: Your user, usually something like postmaster@mg.yourdomain.com
SMTP Pass: Your password

If it works, then you've narrowed it down to an issue with MXroute, and can use it as evidence in your ticket with them. Or, you can just continue to use Mailgun.

Share this post


Link to post
Share on other sites

I tried it with ElasticEmail (another hosted SMTP service) which I already had an account with. The email sends successfully for the root domain, a nonexistent subdomain, and the Blesta install URL. The same occurs with Sendgrid and Mailgun, so we can probably narrow it down to it being my mail provider's fault. I've asked them for a copy of their recent SMTP logs for my domain (I'll get back with what they say). 

Share this post


Link to post
Share on other sites
5 minutes ago, Unixfy said:

I tried it with ElasticEmail (another hosted SMTP service) which I already had an account with. The email sends successfully for the root domain, a nonexistent subdomain, and the Blesta install URL. The same occurs with Sendgrid and Mailgun, so we can probably narrow it down to it being MXroute's fault. I've asked them for a copy of their recent SMTP logs for my domain (I'll get back with what they say). 

Sounds good, and I'm curious why MXroute is refusing to send for the root domain. Thanks for filling us in if you get answers from them! :blesta:

Share this post


Link to post
Share on other sites

Here's a paste of the (relevant) exim logs that they provided for me (emails and IP addresses are all anonymised): https://paste.ee/p/GhRPr#f1J0xUE7zzgbmteWWwTDsmf7kt757I98

/var/log/exim_mainlog:2017-07-17 16:25:02 H=([127.0.0.1]) [Blesta_IP_Address]:36188 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<billing@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed
/var/log/exim_mainlog:2017-07-17 16:26:09 H=(my.example.com) [Blesta_IP_Address]:37270 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<sales@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed
/var/log/exim_mainlog:2017-07-17 16:26:40 H=(my.example.com) [Blesta_IP_Address]:37450 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<sales@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed
/var/log/exim_mainlog:2017-07-18 10:14:06 H=(my.example.com) [Blesta_IP_Address]:48182 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<billing@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed
/var/log/exim_mainlog:2017-07-18 10:16:08 H=(my.example.com) [Blesta_IP_Address]:49364 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<billing@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed
/var/log/exim_mainlog:2017-07-18 10:38:34 H=(my.example.com) [Blesta_IP_Address]:44890 F=<billing@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed
/var/log/exim_mainlog:2017-07-18 10:43:03 H=(my.example.com) [Blesta_IP_Address]:48352 F=<billing@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed
/var/log/exim_mainlog:2017-07-18 10:43:22 H=(my.example.com) [Blesta_IP_Address]:37954 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<billing@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed
/var/log/exim_mainlog:2017-07-18 10:44:07 H=(my.example.com) [Blesta_IP_Address]:38252 X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<billing@example.com> A=dovecot_login:smtp-username@domain.com rejected RCPT <recipientemail@domain.com>: Sender verify failed

 

All of those "Sender Verify Failed" errors occur when sending from the root domain. On the other hand, on any subdomain, there is no such error: 

/var/log/exim_mainlog:2017-07-18 11:32:30 1dXVQE-00043Y-3g <= sales@my.example.com H=(my.example.com) [Blesta_IP_Address]:38178 P=esmtpsa X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no A=dovecot_login:smtp-username@domain.com S=2027 id=cca1af60f07ba5bb530da86ad7c459c4@my.example.com T="Welcome to My Company" for recipientemail@domain.com
/

That is probably why the errors were occurring, the incoming mail server (at the same provider) was rejecting the mails from Blesta because it couldn't verify that my Blesta install actually sent them.

 

EDIT: Yep, the above is the case. Their cPanel server requires the email address to be created in cPanel before you can send emails from it, otherwise, you'd end up with the sender verification errors.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×