Integrations · Mail servers and panels
Check outgoing recipients on DirectAdmin
A DirectAdmin plugin for server administrators. It sets up our Exim recipe on a DirectAdmin server, whose mail server is Exim: a small helper service checks the recipients of the mail your users send out, and by default Exim only logs each result. In refuse mode it refuses recipients that cannot receive mail. Whatever happens to our API or the helper, the mail goes out as usual.
Download the plugin package, ev_exim.tar.gz (version 1.0.0), and add it to DirectAdmin as it is: do not unpack it, and keep the file name ev_exim.tar.gz. A file renamed on the way, for example ev_exim (1).tar.gz from a second download, installs under the wrong name and its page answers "404 Not Found" when you save: rename it back to ev_exim.tar.gz, then uninstall the plugin and add it again. LICENSE (MIT) is at its root. Version 1.0.0 passed recipient checks on DirectAdmin 1.714 with CustomBuild's Exim, on an isolated test server. Try it on a test server of your own before a production one.
What you need
- DirectAdmin 1.689 or later with its own Exim, on AlmaLinux, Rocky Linux or RHEL 8, 9 or 10, Debian 12 or 13, or Ubuntu 22.04, 24.04 or 26.04, with Python 3.6 or later and systemd. The plugin's page runs as root, which its
plugin.confasks for. - An
/etc/exim.conffrom CustomBuild that includes/etc/exim.strings.conf.customand/etc/exim.acl_check_recipient.pre.conf, as CustomBuild writes it. The plugin checks both and refuses to turn checks on otherwise. - An API key from the API keys page with the permission Validate addresses, made for this server, with a daily credit cap. One key for the whole server.
Set it up
- In DirectAdmin, as an administrator: Plugin Manager, add the plugin from the file
ev_exim.tar.gzand install it. Installing changes nothing in Exim. - Open Plugins → email-validation.org recipient checks, paste the key and choose Save and test: one free check of a test address. A key the API refuses is not saved, and saving a key does not turn checks on.
- Under Settings, tick Checks on, choose the mode and the API host (global, or EU data residency), and Save and apply. The plugin checks Exim's configuration before Exim restarts, and puts everything back if a step fails.
Then, in refuse mode, try no_mailbox@sandbox.email-validation.org as the recipient in an SMTP session that logs in to your server and ends after RCPT TO (for example swaks --quit-after RCPT), so no message is ever sent: the server refuses it. Test addresses cost nothing and contact no mail server. Try it on a test server before a production one.
Only admin-level accounts see the page. It shows today's counts by status and the helper's state, never an address.
What gets checked
Only outbound mail: the sender logged in, or connects from a relay host, and the recipient's domain is not hosted on your server. Mail arriving for your own mailboxes is never checked.
Modes
| Status | Log only (default) | Refuse |
|---|---|---|
valid | logged | never refused |
invalid | logged | refused when the address cannot receive mail (no mailbox, no DNS, no inbound mail, unroutable) |
catch_all | logged | never refused |
unknown | logged | never refused |
disposable | logged | refused only with "Also refuse disposable addresses" |
A recipient that could not be checked in time is never refused, and the message still goes to the other recipients. Statuses and reasons explains each value.
A failing check never stops mail
Exim asks the helper over a local socket and waits at most 5 seconds; the helper answers within 3 seconds or lets the recipient through unchecked, and caches a late result for the next message. A stopped helper, a missing key or a failing API means the recipient is accepted as usual. Nothing changes in Exim until an administrator turns checks on, and when DirectAdmin rewrites /etc/exim.conf, a change that no longer fits is taken out rather than left to delay mail.
What it costs
Each check costs at most 1 credit, as with any validation request; unknown results, errors and test addresses are free, and answers from the helper's cache cost nothing. The helper's limits per sender and per day, and the key's daily credit cap, bound what it spends, as the Exim guide explains.
Privacy
For each outside recipient the helper sends only the address, in the body of an HTTPS request to the API host you chose, never in a URL and to no other host. It caches a keyed hash of each address, in memory only. Its log never holds the key or an address, and the plugin sets Exim's per-recipient log line to name the domain only. The key is kept in a root-only file. Checking your customers' outgoing mail is processing of personal data on their behalf: tell them, for example in your hosting terms, and see our DPA.
Remove it
Uninstall the plugin in the Plugin Manager. The statements come out of Exim's files first, the result is checked and Exim restarted; if that fails, nothing is removed. Then the helper stops and its files, key and settings are removed. Then revoke the key on the API keys page.
Licence
The plugin is under the MIT licence (LICENSE in the package): you may use, change and share it.