When my DNS records are proxied, I can login to webmail, but can’t access the mailbox (the connection between Cloudflare and host times out - 524).
The server support team has informed me to contact Cloudflare to check which link to unblock (according to them, it’s being blocked by Cloudflare). Please, advise if you can check which link is blocked, because I couldn’t see any blocked events in the activity log.
None of the records are currently proxied, but I need them to be.
You have your MX record pointed to your apex domain. That will cause problems when proxied. If your webserver is also your mailserver, it is better to create a dedicated name using an A record that can be left unproxied for use with email protocols. Using mail.example.com is quite common.
You will also have to check your webmail settings.
If your mailserver is hosted on the same machine as your webserver, you should probably use localhost as the address instead of your domain in your webmail settings. Using a proxied domain will not work for email, as @epic.network pointed out.
If you used your domain instead, it might very well cause a timeout.
As always, unless hosting your own mailserver is critical for you, I recommend using a professional mail service instead. It’s really not expensive and will likely save you a lot of work.
I am not sure if my problem is with the MX record, since emails are sent and received fine all along, no matter if records are proxied or not.
Nonetheless, I've tried what you've suggested:
* Pointed (non-proxied) MX record to mail2 subdomain (I already have a CNAME record for mail subdomain, so I didn't use that one)
* Added an A record (non-proxied) for mail2 subdomain pointed to my IP address
* Proxied the A record for the domain
* Proxied the webmail subdomain A record
I still get timeouts. I can login successfully, but then I get redirected to something (mailbox) that timesout.
I would lose the mail2 name altogether and delete the mailCNAME before creating mail as a DNS Only A record. Make sure that your MX record is restored to using the mail FQDN.
Let us know when it’s configured that way so we can confirm.