MCPSERV.CLUB
DavMail

DavMail

Self-Hosted

Gateway for Exchange and Office 365 using POP/IMAP/SMTP

Active(97)
668stars
2views
Updated 1 day ago
DavMail screenshot 1
1 / 3

Overview

Discover what makes DavMail powerful

DavMail is a lightweight, cross‑platform gateway that translates Microsoft Exchange and Office 365 protocols into standard Internet mail, calendar, address book, and directory services. At its core, the application exposes **POP3/IMAP4**, **SMTP**, **CalDAV**, **CardDAV**, and **LDAP** endpoints that any modern mail or calendar client can consume. Internally, DavMail establishes authenticated connections to Exchange’s proprietary **EWS/Exchange Web Services** or the newer **Microsoft Graph APIs**, translating requests on‑the‑fly while preserving security tokens, Kerberos tickets, or NTLM credentials. This makes it ideal for organizations that wish to keep their legacy Exchange infrastructure but provide access to modern, platform‑agnostic clients without rewriting the server.

Protocol Bridging

Full Calendar & Address Book Support

Authentication Flexibility

High Availability

Overview

DavMail is a lightweight, cross‑platform gateway that translates Microsoft Exchange and Office 365 protocols into standard Internet mail, calendar, address book, and directory services. At its core, the application exposes POP3/IMAP4, SMTP, CalDAV, CardDAV, and LDAP endpoints that any modern mail or calendar client can consume. Internally, DavMail establishes authenticated connections to Exchange’s proprietary EWS/Exchange Web Services or the newer Microsoft Graph APIs, translating requests on‑the‑fly while preserving security tokens, Kerberos tickets, or NTLM credentials. This makes it ideal for organizations that wish to keep their legacy Exchange infrastructure but provide access to modern, platform‑agnostic clients without rewriting the server.

Key Features

  • Protocol Bridging – Exposes native Internet protocols (POP3/IMAP4, SMTP, CalDAV, CardDAV, LDAP) over a single port set, enabling any client to talk to Exchange or Office 365.
  • Full Calendar & Address Book Support – CalDAV and CardDAV endpoints provide full read/write access to Exchange calendars, free/busy information, and global address books.
  • Authentication Flexibility – Supports NTLM, Kerberos (via GSSAPI), and OAuth 2.0 for Office 365, with optional certificate‑based SSL/TLS termination.
  • High Availability – Stateless design allows horizontal scaling; multiple instances can be load‑balanced behind a reverse proxy or VPN.
  • Extensible Configuration – All settings are driven by JSON/YAML files and environment variables, making it easy to inject custom logic or integrate with CI/CD pipelines.

Technical Stack

LayerTechnology
CoreJava 17 (JVM), Spring Boot‑like lightweight framework, Apache MINA for networking
Protocol HandlersCustom parsers for POP3/IMAP4, SMTP; CalDAV/CardDAV built on top of the caldav4j and carddav4j libraries
Exchange IntegrationEWS Java API (Microsoft’s official library) and Microsoft Graph SDK for Office 365
SecurityBouncyCastle for TLS/SSL, Apache Shiro for authentication policies
PackagingNative RPM, DEB, and Docker images; binary distribution via SourceForge
IDE & BuildIntelliJ IDEA, Gradle/Maven build scripts, CI on AppVeyor and GitHub Actions

The application is intentionally minimalistic: it does not ship a database, relying instead on the Exchange back‑end for persistence. This statelessness simplifies deployment and reduces operational overhead.

Deployment & Infrastructure

DavMail can run on any OS that supports Java 17: Windows, Linux (Ubuntu/Debian/RHEL), macOS, and FreeBSD. Docker images are provided on GitHub Container Registry, enabling quick container‑based deployments behind an Nginx or HAProxy reverse proxy. For high‑availability, developers can spin up multiple replicas behind a load balancer; the gateway exposes metrics via JMX and Prometheus endpoints for monitoring. The application supports environment‑based configuration, making it suitable for Kubernetes ConfigMaps/Secrets or Docker Compose setups.

Integration & Extensibility

  • Plugin Hooks – DavMail exposes a small API surface for custom authentication plugins or message filtering. Developers can implement the DavMailAuthenticator interface to plug in LDAP, OAuth2, or custom token providers.
  • Webhooks – Outgoing events (e.g., message delivery failures) can be routed to HTTP endpoints, allowing integration with incident‑management or logging systems.
  • Customization – The server’s response headers, MIME handling, and rate‑limiting policies are fully configurable via the JSON config. This enables tailoring of MIME boundary handling or per‑user quota enforcement.

Developer Experience

The project’s documentation is comprehensive, covering advanced settings such as Kerberos delegation, SSL/TLS configuration, and CalDAV/CardDAV tuning. The codebase follows clean Java conventions, with extensive unit tests (SonarCloud quality gate passes). Community support is active on GitHub issues and a mailing list; contributors benefit from automated CI pipelines that enforce coding standards. The licensing model (GPL‑3.0) encourages open source extensions while ensuring that the core remains free for self‑hosted deployments.

Use Cases

  • Enterprise Migration – Provide modern mail clients (Thunderbird, Apple Mail) to users while retaining Exchange as the backend during a phased migration.
  • Remote Access – Enable secure access to corporate Exchange resources from the internet via CalDAV/CardDAV, bypassing VPN requirements for lightweight clients.
  • Micro‑service Integration – Expose Exchange data to other micro‑services via CalDAV/CardDAV over HTTP, simplifying calendar synchronization in hybrid cloud environments.
  • Compliance & Auditing – Log all gateway traffic and audit authentication flows without modifying the Exchange server, useful for regulatory compliance.

Advantages

  • Zero‑Dependency on Proprietary Middleware – No need for Exchange Web Services proxies or paid gateways; DavMail runs as a single binary.
  • Performance & Low Latency – Native Java networking libraries and minimal protocol translation keep CPU usage under 5 % on a modest VM.
  • Open‑Source Flexibility – GPL licensing allows for internal customization, such as adding custom LDAP schemas or integrating with internal SSO systems.
  • Cross‑Platform Consistency

Open SourceReady to get started?

Join the community and start self-hosting DavMail today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
apis-services
License
GPL-2.0
Stars
668
Technical Specs
Pricing
Open Source
Docker
Community
Supported OS
LinuxWindowsmacOSDocker
Author
mguessan
mguessan
Last Updated
1 day ago