Exim Username-Based Authentication (DirectAdmin)

  1. Ensure the outgoing authenticating user is added in the Spam Experts systems my following the instructions to Add an Outgoing User
  2. Ensure the outgoing user has appropriate limits set to match your traffic volumes
  3. Open the Exim configuration file /etc/exim.conf
  4. Add the following to the Routers section after Begin Routers:
  5. spamexperts_smarthost_router:
    driver = manualroute
    domains = ! +local_domains
    ignore_target_hosts =
    condition = "${perl{check_limits}}"
    # Exclude null sender messages from relaying via the smarthost
    condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
    headers_add = ${if !eq{$original_domain}{$domain}{X-Forwarded-For: $original_local_part@$original_domain}}\n\
    X-AuthUser: $authenticated_id
    headers_add = X-AuthUser: $authenticated_id
    transport = spamexperts_smarthost_transport
    route_list = $domain SMARTHOST::587

    Where SMARTHOST is smtp.antispamcloud.com or as otherwise detailed here.

  6. Depending on the configuration, you may have to comment "lookuphost:" router
  7. Add the following to the Transports section after Begin Transports:
  8. spamexperts_smarthost_transport:
    driver = smtp
    # In-case your server continues to send outgoing over port 25 please add the below line
    port = 587
    hosts_require_tls = SMARTHOST
    hosts_require_auth = *

    Where SMARTHOST is smtp.antispamcloud.com or as otherwise detailed here.

  9. Add the following to the Begin Authenticators section:
  10. spamexperts_login:
    driver = plaintext
    public_name = LOGIN
    client_send = : username@demo-domain.invalid : yourUserPassword

    Where username@demo-domain.invalid is the full email address and yourUserPassword is the password for the Authenticating user as configured in Spam Experts

  11. Restart Exim
  12. If you are signing with DKIM on your Direct Admin server you may need to add the following line under hosts_require_tls
  13. .include_if_exists /etc/exim.dkim.conf

Disclaimer: This documentation may contain references to third party software or websites. N-able has no control over third party software or content and is not responsible for the availability, security, or operation, of any third-party software. If you decide to utilize a release involving third-party software, you do so entirely at your own risk and subject to the applicable third party’s terms and conditions of the use of such software. No information obtained by you from N-able or this documentation shall create any warranty for such software.