Exim SMTP settings (quick reference)
- SMTP host:
mail.yourdomain.com(or another hostname pointing to your Exim server) - Ports: 25, 465, 587 (plus any custom ports you configure)
- Encryption: STARTTLS on 25/587, implicit TLS on 465 (if enabled)
- Username: Mailbox or app user from your auth backend (system accounts, virtual users, database, etc.)
- Password: Password or credential tied to that user
- Auth: Authentication required for submission; do not expose an open relay
What Is Exim?
Exim is a free, open‑source Mail Transfer Agent (MTA) originally developed at the University of Cambridge for Unix‑like systems. It can relay, route, and deliver email both locally and to remote servers.
Exim is known for being one of the most flexible and configurable MTAs: its configuration language behaves almost like a mini framework for complex routing, policies, and filtering. This makes it popular with hosting providers, universities, and environments where “standard” mail routing is not enough.
Who Should (and Shouldn’t) Use Exim?
Exim is ideal when you need advanced routing, per‑domain policies, and deep integration with spam/virus filters or external data sources. It is less ideal if you just want a simple, opinionated MTA or a cloud ESP you never touch.
Ideal Exim user profiles
| Use case | Why Exim fits |
|---|---|
| Shared hosting providers | Per‑domain rules, integration with panels like cPanel, many virtual domains. |
| Universities / large orgs | Complex routing, custom policies, and multiple domains/users. |
| Advanced mail admins | Want a “scripting‑like” config language for rules and filters. |
| Heavy filtering / security use | Deep integration with anti‑spam/anti‑virus and custom ACLs. |
When Exim is not a great fit
- Admins who prefer simple, parameter‑based config (Postfix) over a flexible but complex language.
- Teams without time or skills to maintain a highly customizable mail policy layer.
- Situations where you actually want a full ESP (templates, campaigns, UI) instead of just an MTA.
Exim vs Postfix vs Sendmail (High‑Level)
Positioning overview
| Feature / MTA | Exim | Postfix | Sendmail |
|---|---|---|---|
| Design focus | Extreme flexibility and custom routing/filtering | Security, performance, simpler config | Legacy, historic default |
| Config style | Single monolithic config with “mini language” | Parameter‑based, modular daemons | Complex m4‑based configs |
| Best for | Complex policies, multi‑domain hosting, heavy filtering | General‑purpose modern mail servers | Legacy/compat setups |
| Learning curve | Steeper | Moderate | Steep (and dated) |
In many “clean slate” setups, Postfix is picked for simplicity, while Exim is chosen when you explicitly need the extra power and flexibility.
Prerequisites Before Deploying Exim
Technical prerequisites
- A hardened Unix/Linux server with firewall rules for SMTP ports.
- DNS control for your domain: A/MX, SPF, DKIM (via a signer), and DMARC.
- Static or stable IPs with proper reverse DNS from your provider.
- Basic knowledge of SMTP and comfort editing Exim’s configuration file(s).
Business & list prerequisites
- Clear purpose: user mailbox hosting, app relay, smart‑host, or complex routing gateway.
- Policy decisions: who can send, relay, rate limits, and how you handle abuse.
- A strong bias toward permission‑based sending; spammy/bulk cold traffic will hurt reputation fast.
Exim Architecture and Core Concepts
Exim has a relatively monolithic architecture compared to Postfix’s strict multi‑process modular model, but it exposes a very powerful configuration structure.
Key concepts
- Routers: decide where messages go (local, remote, smart‑host, etc.).
- Transports: define how messages are delivered (SMTP, LMTP, pipe, local file, etc.).
- ACLs (Access Control Lists): control SMTP‑time decisions (who can send, filtering, spam checks).
- Retry rules: govern how Exim retries temporary failures and when it gives up.
The configuration file is divided into sections (main, ACLs, routers, transports, retry, etc.), with support for macros, conditions, and external includes. This structure is what makes Exim so expressive for advanced policies.
Exim SMTP Settings and Common Use Cases
Typical SMTP submission setup
- End‑users and apps submit mail on port 587 with STARTTLS and AUTH.
- Port 25 is used for server‑to‑server SMTP with stricter anti‑spam and relay controls.
- Optionally, port 465 can be enabled for implicit TLS if you need legacy client compatibility.
Common Exim use cases
- Shared hosting mail server: many domains and users, per‑domain policies, panel integration.
- Smart‑host / outbound relay: internal systems send via Exim, which applies policies and delivers.
- Filtering gateway: Exim in front of internal MTAs, tightly integrated with spam/virus engines.
Performance and Scaling with Exim
Exim is capable of handling large email volumes and is used in busy environments like hosting platforms and academic networks.
Performance characteristics
- Handles thousands of messages per hour and can be tuned for much higher traffic.
- Flexible routing and ACLs allow different behavior per domain or user without separate instances.
- Logging and error reporting make it easier to troubleshoot delivery and policy issues at scale.
Tuning basics for volume
- Adjust concurrency and process limits to allow more simultaneous deliveries.
- Carefully design routers/transports to avoid unnecessary lookups and complexity.
- Tune retry rules and timeouts to match real‑world behavior of your target domains.
Deliverability & Security Best Practices on Exim
Exim’s strength is policy control; use that to your advantage.
Authentication, encryption & anti‑abuse
- Require AUTH + TLS on submission ports for users and applications.
- Use ACLs to block unauthorized relaying, suspicious HELOs, and abusive patterns.
- Integrate with spam and virus filters (e.g., SpamAssassin, ClamAV) for SMTP‑time checks.
DNS & reputation
- Ensure SPF, DKIM, and DMARC are properly configured for all sending domains.
- Align reverse DNS, HELO/EHLO names, and visible “From” domains.
- Consider IP separation or policy separation for transactional vs marketing traffic.
Exim in App / SaaS Architectures
Exim can serve as the outbound MTA for web applications or as part of a more complex mail infrastructure.
Typical application stack with Exim
| Layer | Example components | Role |
|---|---|---|
| App / SaaS | Laravel, Django, Rails, Node, etc. | Generates transactional or bulk messages. |
| MTA | Exim | Routes and delivers via SMTP with custom policies. |
| Filtering | SpamAssassin, ClamAV, custom scripts | Content checks and anti‑abuse logic. |
| Monitoring | Logs, metrics, dashboards | Delivery, queue, and error visibility. |
This approach is especially powerful when you need different rules per customer, region, or product but still want one central MTA layer.
Monitoring and Troubleshooting Exim
Key tools & logs
- Main log files (typically
/var/log/exim/mainlog,rejectlog, etc.) for SMTP sessions and errors. - Command‑line tools like
exim -bp(queue),exim -M/-Mrm(message operations). - Configuration test tools (e.g.,
exim -bV,exim -bP,exim -bV -dfor debugging).
What to monitor
- Queue size and message age per destination.
- Rejects, defers, and SMTP error patterns (per domain and globally).
- Authentication failures and suspicious behavior flagged by ACLs.
Pros, Cons and Alternatives to Exim
Pros
- Extremely flexible configuration for routing, policies, and filtering.
- Great fit for multi‑domain hosting and complex mail environments.
- Strong integration options with external databases, directories, and filters.
- Active open‑source project and community.
Cons
- Configuration language has a steeper learning curve than Postfix’s parameter style.
- Monolithic config can become complex in large deployments if not structured carefully.
- No built‑in marketing UI; everything beyond SMTP has to be integrated or built.
Alternatives
- Postfix: simpler to configure for most common cases, strong security and performance.
- Sendmail: legacy; mainly for compatibility with older systems.
- Commercial MTAs (PowerMTA, GreenArrow, etc.): add vendor support and specialized ESP‑grade features.
Exim FAQ
Is Exim still a good choice?
Yes. Exim remains a widely used, actively maintained open‑source MTA, especially in hosting and complex routing environments where its flexibility is a major advantage.
Is Exim suitable for high‑volume sending?
Yes. With proper tuning and hardware, Exim can handle large volumes of email and is used by high‑traffic providers. Performance will depend on your routing complexity, policies, and recipient behavior.
Exim or Postfix for a new server?
For straightforward, secure mail servers, many admins default to Postfix. If you know you need very advanced routing, per‑domain logic, and deep filtering integration, Exim is often the better choice.
Can I use Exim as an SES/SendGrid replacement?
You can use Exim as your app’s SMTP relay, replacing a cloud provider at the infrastructure level. However, you then own IP reputation, DNS, monitoring, and compliance-cloud ESPs normally abstract all of that away.
About the Author

Alaa · LinkedIn
Email infrastructure specialist with 8+ years of hands-on experience in SMTP, deliverability, and email verification. I’ve configured and troubleshot mail systems across Postfix, Exchange, and cloud relays, managed IP reputation and warmup campaigns, and built verification pipelines processing millions of addresses. My work spans DNS authentication (SPF, DKIM, DMARC, BIMI), bounce handling, blocklist monitoring, and compliance frameworks including CAN-SPAM and GDPR. I write every article on SMTPedia to give email professionals, developers, and marketers the accurate, RFC-grounded reference they need.
About SMTPedia
SMTPedia is an independent email industry reference covering SMTP, IMAP, POP3, email deliverability, marketing platforms, DNS authentication, and email verification. Every article is researched from official provider documentation, IETF RFCs, and industry best practices. Settings and configurations are verified quarterly.
We are cited as a source by ChatGPT, Microsoft Copilot, and thousands of email professionals worldwide. Learn more about our editorial process.

