Cloudflare and Mdaemon
-
Hello,
We added Cloudflare with Proxy to protect our servers/IP's but we noticed MDaemon no working.
Would there be anything we would need to change to allow in MDaemon settings in order for us to utilize Cloudflare Proxy?
Thank you.
-
Hello @Allen,
We would need to know a bit more about what you're seeing when you say MDaemon is not working. What specifically is failing? Is an SMTP connection making it to MDaemon and failing? What does it show in the SMTP-in log? Or are you having problems retrieving email in a client? If so, what method are you using (IMAP, POP, ActiveSync?) and what does the log show is happening?
If you are seeing nothing at all in the MDaemon logs, then it sounds like the connection isn't making it through to reach MDaemon.
I hope this is helpful. please let us know if you have further questions.
-
Thank you for your reply.
We are currently testing to see what exactly is happening when Cloudflare proxy is turned on.
What seems to be the problem is ActiveSync. Not getting any emails or able to send when it's on.
What ports does ActiveSync uses to connect to MDaemon?
Thank you.
-
@Allen
This is from the MDaemon Help file topic on ActiveSync:
ActiveSync is a web-service extension that only works on ports 80 (for http) and 443 (for https). This is an ActiveSync implementation requirement. If ActiveSync is enabled and you are using Webmail's built-in web server, but it is not running on port 80 or 443, then it will automatically begin running on port 80 in addition to whatever other ports you have configured on the Web Server and SSL & HTTPS screens. If you are using another server for Webmail such as IIS then you must manually configure it to use port 80 or 443.
I recommend if you are going to use ActiveSync to go ahead and set WorldClient to use port 80 and 443, instead of attempting to use ActiveSync while WorldClient users are on the default ports.
-
Thank you!
-
Hello,
We tested more throughly after hours and this is what we're experiencing.
Cloud proxy turned on, Using Web mail instead of IIS or any other server, IP persistence is checked off and Use cookies is turned on under web & IM services. HTTP redirected to HTTPS is on.
Soon after turning on Proxy World client and activesync works fine. sending and receiving works. no issues.
However, after sometime, iPhone (activesync) would stop getting emails. When I tried to refresh, it would give "Account error".
Is there a setting I'm overlooking for activesync to work under proxy?
any help would be greatly appreciated.
Thank you.
-
This is from activesync log.

-
If its not already enabled, please enable debug logging for ActiveSync by logging into Remote Administration and going to ActiveSync / Diagnostics, set the Log Level to Debug and click Save. Then reproduce the issue and check the AirSync-$DATE$.log file for errors. It should provide a better explanation for the error you are seeing on the phone.
Once you find the session, please post it here (be sure to obfuscate any private data). If you'd rather not post it here, please upload the log to us and include the details of the session so that we can find it.
https://mdaemon.sharefile.com/r-rc3922c1eed334d4dbf5e34f0bd04ccd6
Let us know the name of the file you've uploaded once the upload is complete.
-
Thanks for the log sessions, they are showing the client trying to sync an item that is malformed and that can't be found on the server. These are warnings only and should not cause the client to show an account error. If you'd like to investigate the cause, check the user's mailbox on the server for md5001000015906.msg. This is jsut a guess, but it looks like the client is trying to move the item, I wonder if it has already been moved by another client or by a previous request from the same client.
-
Hello,
I tested once more with debug option and uploaded the file.
When I turn on the proxy, it works fine for about 30 minutes or so.
sending and receiving is fine but after a while activesync clients start dropping off.
Before starting proxy, 180 clients and after 30 minutes or so, it go down to less than 100.
Your help would be greatly appreciated.
Thank you.
-
What is the name of the file you uploaded? I'm not finding it. After adding the file to the upload page, there is an upload button you have to click to upload the file.
-
Hi Arron,
name of the file is PaulKim.txt
I did click on the upload. I'll upload again.
I didn't want to upload the whole file as it's kind of big. would you like me to upload the full file?
Thank you.
-
Can you upload the entire Activesync log file so I can get a better idea of what is happening?
-
Thank you for the quick reply.
I have uploaded the entire file. Name is AirSync-2026-01-11.log
The Cloudflare proxy was turned on around 10:40PM. Turned off around 11:30PM.
Thank you.
-
What logging options do you have enabled for Dynamic Screening? (Security | Dynamic Screening) You'll probably want, log block list hits, log failed authentication, log connections refused, at a minimum.
Are there any messages in the dynamic screening log file about IPs being blocked? Do they correspond to the ActiveSync devices that start getting errors after enabling Cloudflare?
Can you also upload a copy of your dynscrn log file?
-
Hi Arron,
Those loggings were enabled and I just uploaded the log file.
Couldn't really tell how it connects to the account that failed after proxy as I couldn't tell what time those were allowed or blocked.
your input would be greatly appreciated.
Thank you
-
I'm not seeing anything in the logs that would explain 80 less clients connecting. I would expect to see errors all over the place in the logs, but nothing is standing out to me.
Are the sessions being blocked by cloudflare before they get to MDaemon?
-
Hi Arron,
Thank you for looking over the logs and direction.
We will connect with Cloudflare to take a deeper dive.
Thank you.
-
Hi Arron,
After looking at Cloudflare, we realized path /Microsoft-Server-ActiveSync was being blocked after multiple "POST"s.
Could you let me know which path is used by ActiveSync and what type of requests are made by and for ActiveSync?
As alway,
Thank you for your help.
-
ActiveSync always uses /Microsoft-Server-ActiveSync and it typically uses the HTTP OPTIONS and POST verbs.
- 1 / 2
- 2