Install Exim4 on an Ubuntu test server
Install Exim4, choose local-only operation, and understand Ubuntu's generated configuration before opening SMTP to a domain.
Reviewed
Exim4 supplies SMTP routing and delivery, not an IMAP mailbox service. Start with local-only operation on a clean Ubuntu Server test host; Internet-facing reception and authenticated submission require additional policy and TLS configuration.
If you have not chosen an MTA yet, the Exim section of our Linux mail-server comparison describes the routing trade-offs.
Install without replacing a production mail service
Use a supported Ubuntu release, sudo access, and a host with no existing mail workload. Keep provider/host firewall rules closed to public SMTP during installation: a package can start its service automatically. Review apt’s proposed package removals, especially any existing MTA. Do not replace a service with queued mail as part of this walkthrough.
Follow Ubuntu’s Exim4 installation documentation:
sudo apt update
sudo apt install exim4
sudo dpkg-reconfigure exim4-config
Select local delivery only; not on a network for the initial setup. Keep the listener configuration restricted to loopback and do not authorize other machines to relay through the host. Record the mail name and local-domain choices rather than using a copied production domain.
Understand the generated configuration
The wizard records choices in /etc/exim4/update-exim4.conf.conf. For non-split configuration, the template is /etc/exim4/exim4.conf.template; split configuration uses /etc/exim4/conf.d/. Choose one mode and follow instructions for that mode.
Never edit /var/lib/exim4/config.autogenerated directly: regeneration overwrites it. After reviewing any template or wizard changes, generate configuration, check that Exim can parse it, then restart:
sudo update-exim4.conf
sudo exim4 -bV
sudo systemctl restart exim4
systemctl status exim4 --no-pager
sudo ss -ltnp
Stop if configuration parsing fails; do not restart into an invalid configuration. Inspect listeners to confirm the intended local-only boundary. Use /var/log/exim4/mainlog and the service journal when startup fails; don’t share credentials or full configuration output in public logs.
Move from package installation to domain configuration
Continue with Exim host identity and SMTP acceptance policy before opening public listeners. Check accepted recipients and rejected unauthorized relay before changing a test domain’s MX. Add a trusted TLS certificate before enabling password-based network authentication.
Use router and transport tracing to inspect delivery decisions and queue diagnostics for deferred or frozen messages. A valid configuration is not proof of deliverability; direct sending also needs appropriate DNS authentication, reverse DNS, and IP reputation.
These steps follow the distribution documentation; MailKite has not claimed a hands-on installation or delivery benchmark for this recipe.