Exim SMTP Authentication

define standard plain text auth

  driver                     = plaintext
  server_set_id              = $auth2
  server_prompts             = :
  server_condition           = ${if and {{eq{$auth2}{username_here}}{eq{$auth3}{password_here}}}}
  server_advertise_condition = true  ${if def:tls_cipher }
  1. server_set_id defines which parameter to use as the id (this will show up in log messages)
  2. server_condition defines the condition to use for authentication $auth1 is the auth type (PLAIN, LOGIN, etc), a$auth2 and $auth3 are compared to whatever strings are entered between the subsequent braces
  3. the rest is self explanatory

Using a DB

server_condition           = ${lookup{$auth2}dbm{/etc/passworddb}\
                                {${if eq{$value}{$auth3}}} {false}}

Then create a temporary file with key/value list of usernames separated with a colon


Then run exim_dbm:

exim_dbmbuild plain_text_passwords.txt passworddb


Below are a list of tests that should be checked along with their results:
With Auth to remote address: Completed
with auth to local address: Completed
Without Auth to remote address: rejected RCPT <user@remote.com>: relay not permitted
without auth to local address from local address: Completed
without auth to local address from remote address: Completed