Modern versions of SupportCandy removed the legacy “Local Exchange” connector and now only ship three piping options—Basic IMAP, Gmail API and Microsoft Exchange API12. If your mailboxes sit on on-prem Exchange, hybrid Exchange or Office 365 tenants where the Exchange API route is blocked or requires complicated Azure registration, you can still bring every support email straight into WordPress: run DavMail as an IMAP bridge and let SupportCandy consume it like any other mail server.
Below is a complete, SEO-optimised step-by-step guide you can copy-paste into your tech blog.
Why DavMail?
- Protocol Translation – DavMail speaks EWS/OWA on the back end and exposes standard ports (IMAP, POP, SMTP, CalDAV, LDAP) on the front end3.
- Works with MFA & Modern Auth – The
O365Modern
yO365Interactive
modes log in via OAuth2, so Office 365 tenants with MFA are covered45. - Runs Anywhere – Java application; works on Windows, macOS, Linux or inside a Docker/LXC container.
- Keeps SupportCandy Simple – SupportCandy only sees “localhost:1143” (or 993 if you enable SSL) and imports tickets through its familiar IMAP screen6.
Prerequisites
Componente | Minimum version | Notes |
---|---|---|
WordPress | 5.6+ | Required by SupportCandy7. |
SupportCandy Core | 3.x | Plus the Email Piping add-on. |
Java Runtime | 8+ | Needed to run DavMail. |
Exchange | 2007+ (EWS) or Office 365 | OWA/EWS URL must be reachable from the DavMail host4. |
Step 1 – Download & Install DavMail
Windows
- Grab the installer from SourceForge (
davmail-win64.exe
). - Run as Administrator; leave default ports (1143 IMAP, 1025 SMTP, 1080 CalDAV, etc.) for a workstation setup3.
Linux (system-wide service)
bashsudo apt install davmail
sudo systemctl enable davmail
Docker one-liner
bashdocker run -d \
-e DAVMAIL_URL=https://outlook.office365.com/EWS/Exchange.asmx \
-e DAVMAIL_MODE=O365Modern \
-p 1143:1143 -p 1025:1025 \
--name davmail gatewayapps/davmail
Step 2 – Configure DavMail
Abrir davmail.properties
(GUI → Settings… or /etc/davmail.properties
).
Essential entries:
text# Talk to Exchange
davmail.url=https://outlook.office365.com/EWS/Exchange.asmx # or on-prem OWA/EWS URL
davmail.mode=O365Modern # O365Modern, O365Interactive or EWS[8][50]
# IMAP gateway
davmail.imapPort=1143 # switch to 993 if you want SSL[7]
# Run headless on a server
davmail.server=true
Save & restart DavMail.
Test with Telnet:
bashtelnet localhost 1143
* OK IMAP4rev1 DavMail server ready
Step 3 – Harden with SSL (Optional but Recommended)
- Generate a PKCS#12 keystore or import a CA certificate8.
bash
keytool -genkey -storetype PKCS12 -keystore /opt/davmail.p12 \
-keypass CHANGEIT -storepass CHANGEIT \
-dname "CN=support.example.com,OU=IT,O=Company,L=City,C=US"
- Add to
davmail.properties
:
text
davmail.ssl.keystoreType=PKCS12
davmail.ssl.keystoreFile=/opt/davmail.p12
davmail.ssl.keyPass=CHANGEIT
davmail.ssl.keystorePass=CHANGEIT
davmail.imapPort=993 # secure IMAPS
davmail.smtpPort=465 # secure SMTPS[44]
- Restart and re-test:
openssl s_client -connect localhost:993
.
Step 4 – Point SupportCandy to DavMail
- Support → Settings → Email Piping → IMAP.
- Fill the form:
textEmail address: support@example.com
Password: <mailbox password or app-password>
Incoming server: 127.0.0.1
Port: 1143 (or 993 with SSL)
Encryption: None (or SSL)
SupportCandy will now fetch every mail arriving in the Exchange inbox and turn it into tickets. Remember that the docs state Exchange is “not allowed” over basic IMAP6; DavMail circumvents that because the Exchange side is EWS while SupportCandy sees standard IMAP.
Step 5 – Run DavMail as a Service
Systemd example (/etc/systemd/system/davmail.service
)
text
[Unit]
Description=DavMail Exchange Gateway
After=network.target
[Service]
ExecStart=/usr/bin/davmail /etc/davmail.properties
SuccessExitStatus=143
Restart=always
User=davmail
[Install]
WantedBy=multi-user.target
bash
sudo systemctl daemon-reload
sudo systemctl start davmail
sudo systemctl enable davmail
Troubleshooting Cheat-Sheet
Síntoma | Likely Cause | Fix |
---|---|---|
Port already in use in DavMail logs9 | Another process (or previous DavMail instance) bound to 1143/1025 | fuser -k -n tcp 1143 then restart service. |
Broken pipe or timeout during large messages10 | Exchange throttling or client idle | Increase davmail.timeout (ms) in properties to 120000 . |
MFA loop in O365 | Using EWS mode on a tenant with modern auth enforced | Switch to O365Modern o O365Interactive 5. |
SupportCandy fetches nothing | Wrong port/encryption | Match 1143→None or 993→SSL. Check mailbox credentials. |
Emails duplicate or not marked read | Set “Leave a copy on server” in SupportCandy to off and enable “Mark message read after fetch”. |
Final Thoughts
Until SupportCandy re-introduces a first-party on-prem Exchange connector, DavMail is the quickest, zero-cost workaround to keep your Microsoft Exchange or Office 365 mailboxes flowing into WordPress. Combined with SupportCandy’s robust ticket management and DavMail’s OAuth-compatible gateway, you get enterprise-grade helpdesk automation without paid SaaS fees or complex Azure permissions.
Plug it in, secure it, and let your agents focus on solving tickets—not wrestling with Exchange APIs.
Happy bridging!
Hey there, grahammiranda.com is yours…