I have a WordPress site, that has contact forms that send mail through the SendGrid API using the Post SMTP plugin.
There are email accounts for the site e.g. [email protected] managed separately with the domain registrar.
I have all the DNS records in Cloudflare for SendGrid and the mailbox, and this has been working well.
I then destroyed the old EC2 server the site was running on, and moved the site to Hestia on a fresh Ubuntu instance (it’s great!). I followed this video for the Hestia-with-Cloudflare part, which included “setting up email” on Hestia i.e. creating an “Email Domain” and adding an MX record to route emails to the server. My plan was to investigate Hestia’s mail server at a later date.
I also configured Mail Server > Global SMTP Relay in Hestia with SendGrid, under the assumption doing so would route internal Hestia emails (update notifications, password reset etc.) through SendGrid.
Configuring email turned out to be a big mistake, as after the server move any emails sent to [email protected] stopped arriving in the domain registrar’s mailbox, I assume due to the MX record with the same priority. Removing this record thankfully allowed emails (from Gmail for e.g.) to arrive.
However, emails sent from contact forms on the site still don’t arrive at [email protected] despite being sent by SendGrid. I have strange “blocks” logs in SendGrid that mention HestiaCP:
[email protected] error dialing remote address: dial tcp 168.244.76.210:0->105.21.5.101:25: i/o timeout
I have switched off “Global SMTP Relay”, removed any related DNS records as above, deleted the “Mail Domain” in Hestia but these emails still aren’t arriving.
Can anyone shed any light on where I should be looking to debug this? I’m a bit confused as to how the Hestia installation has interfered with SendGrid’s sending.
It feels like enabling “Global SMTP Relay” was the biggest mistake here. Do I need to do some extra cleanup after disabling this option?
I’m essentially looking for Hestia to not interfere with emails at all, and disable all email-related functionality (other than core Hestia emails).