Overview
Discover what makes Exim powerful
Exim is a high‑performance, fully‑featured Message Transfer Agent (MTA) written in C and designed for Unix‑like operating systems. Its primary function is to receive, route, queue, and deliver email using the SMTP protocol while providing extensive hooks for filtering, authentication, and policy enforcement. Exim’s architecture is modular: core delivery logic is separated from configuration parsing, routing tables, and content inspection modules, allowing developers to replace or extend individual components without touching the core binary. The configuration language is declarative and file‑centric, enabling fine‑grained control over mail flow through a single human‑readable file (`exim.conf`), yet the system can also expose runtime APIs for dynamic routing decisions.
Language
Core Libraries
Database Support
Configuration
Overview
Exim is a high‑performance, fully‑featured Message Transfer Agent (MTA) written in C and designed for Unix‑like operating systems. Its primary function is to receive, route, queue, and deliver email using the SMTP protocol while providing extensive hooks for filtering, authentication, and policy enforcement. Exim’s architecture is modular: core delivery logic is separated from configuration parsing, routing tables, and content inspection modules, allowing developers to replace or extend individual components without touching the core binary. The configuration language is declarative and file‑centric, enabling fine‑grained control over mail flow through a single human‑readable file (exim.conf), yet the system can also expose runtime APIs for dynamic routing decisions.
Architecture & Technical Stack
- Language: C (C89/C99), with optional extensions for newer compilers.
- Core Libraries: Uses POSIX sockets,
libc, and optional OpenSSL for TLS support. The daemon is single‑process but uses multi‑threading only for DNS lookups and TLS handshakes. - Database Support: Exim can interface with external databases (MySQL, PostgreSQL, SQLite) for dynamic routing tables and ACL lookups. It also supports local files (
/etc/exim/passwd,hosts.allow) for static configuration. - Configuration: The central
exim.conffile is parsed at startup; changes can be reloaded withSIGHUP. The syntax allows nested macros, conditional blocks, and user‑defined routers. - Plugin/Extension Model: While Exim does not use a traditional plugin API, it offers ACL (Access Control List) blocks that can invoke external scripts via
systemorpipe, enabling integration with any language or service.
Core Capabilities
- Dynamic Routing: Custom routers evaluate each message and decide delivery paths based on headers, sender/recipient domains, or external database lookups.
- Advanced Filtering: ACLs support checks for SPF, DKIM, DMARC, content scanning (via external tools), and rate limiting.
- Queue Management: A robust queue system with
exim -bVfor status,exim -bpto list queued messages, and support for remote queue management over TCP. - Transport Flexibility: Multiple transports (SMTP, local delivery, virtual) can coexist; each transport can be configured with its own TLS settings and authentication mechanisms.
- API Exposure: Exim exposes a control socket (
/var/run/exim.sock) for commands likesend,quit, andstatus, which can be used by automation scripts or monitoring tools.
Deployment & Infrastructure
- Self‑Hosting Requirements: Runs on Linux, BSD, Solaris, and macOS. Requires a fully qualified domain name (FQDN), DNS records (
MX,A/AAAA), and optionally TLS certificates. The default installation is a single binary plus configuration files; no external runtime is needed. - Scalability: Exim can handle thousands of concurrent connections. For high‑throughput environments, it is common to run multiple instances behind a load balancer or use exim‑queue sharding for distributed queue processing.
- Containerization: Official Docker images are available, but the community often prefers custom images due to the need for persistent queue directories and TLS key mounts. Exim’s small footprint (≈ 15 MB binary) makes it suitable for micro‑service stacks.
Integration & Extensibility
- Webhooks/External Services: ACLs can trigger HTTP requests or send messages to message queues (Kafka, RabbitMQ) via
pipescripts. - Scripting Hooks: The system and pipe ACL actions allow any executable to process mail headers or content, enabling integration with Python, Go, or Node.js services for spam filtering or analytics.
- API Clients: Third‑party libraries exist in several languages (Python
exim4wrapper, RubyExim::Client) to interact with the control socket programmatically. - Customization: The configuration language supports include directives, enabling modular config files per domain or service.
Developer Experience
- Documentation: The official manual (
exim.conf.5) is comprehensive, with a wealth of examples and best‑practice guides. The community wiki supplements this with real‑world configurations. - Community & Support: Active mailing lists (
exim-users,exim-devel) and a dedicated bug tracker provide rapid assistance. The project’s long history means mature release cycles and backward compatibility. - Licensing: GPLv2 ensures freedom to modify, redistribute, or embed Exim in proprietary systems under the same license terms.
Use Cases
- Enterprise Mail Gateways – Centralized SMTP relay with SPF/DKIM enforcement, integrated with internal authentication services.
- Service‑Oriented Architectures – Exim as a lightweight mail transport in micro‑service stacks, interfacing with REST APIs for dynamic routing.
- High‑Volume Mailing Lists – Leveraging Exim’s queue sharding and bulk delivery features for newsletters or transactional emails.
- Compliance‑Heavy Environments – Using Exim’s audit logs and policy hooks to meet regulatory requirements for email retention and monitoring.
Advantages Over Alternatives
- Performance & Flexibility: Exim’s routing engine is more granular than Sendmail’s and less opinionated than Postfix, allowing custom logic per message without rewriting the daemon.
- Extensibility: ACLs provide a built‑in scripting hook without needing external plugins, simplifying deployment.
Open SourceReady to get started?
Join the community and start self-hosting Exim today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps
FoodCoopShop
Open‑source shop for local food cooperatives
ChartDB
Instant database diagramming and migration without passwords
LMS
Self-hosted music streaming with rich metadata and discovery
Audioserve
Simple, minimal audio book server for web and mobile
bitmagnet
Self‑hosted BitTorrent indexer with DHT crawling
Screego
Low‑latency screen sharing for developers
