#start of /etc/exim/exim.conf

###########################################################

#

# EXIM CONFIGURATION

#

###########################################################

acl_smtp_rcpt = acl_check_rcpt

tls_advertise_hosts = *
daemon_smtp_ports =  25 : 465 : 587
tls_on_connect_ports = 465
tls_certificate = /etc/pki/tls/certs/exim.pem
tls_privatekey = /etc/pki/tls/private/exim.pem
auth_advertise_hosts = *



###########################################################

#

#ACL CONFIGURATION

#

###########################################################

begin acl

acl_check_rcpt:


accept domains = testdomain.local : *.testdomain.local
       endpass
require verify = sender
accept authenticated = *
require verify = recipient
control = submission/sender_retain
deny message = Authentication failed

accept hosts = 127.0.0.1 : 192.168.2.0/24

deny message = relay not permitted


###########################################################

#

#ROUTERS CONFIGURATION

#

###########################################################

begin routers



dnslookup:

driver = dnslookup

domains = !testdomain.local : !*.testdomain.local

transport = remote_smtp

ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8

no_more



localuser:

driver = accept

check_local_user



#transport = local_delivery



transport = dovecot_delivery

cannot_route_message = unknown user

no_more



###########################################################

#

#TRANSPORTS CONFIGURATION

#

###########################################################

begin transports

remote_smtp:
driver = smtp
helo_data = server1.testdomain.local


hosts_require_auth = server1.testdomain.local
hosts_try_auth = server1.testdomain.local



local_delivery:

driver = appendfile

#file = /var/mail/$local_part

directory = $home/Maildir

maildir_format

maildir_use_size_file

delivery_date_add

envelope_to_add

return_path_add

#group = mail

#mode = 0660





dovecot_delivery:

driver = pipe

command = /usr/libexec/dovecot/deliver

message_prefix = 

message_suffix = 

log_output

delivery_date_add

envelope_to_add

return_path_add

temp_errors = 64 : 69 : 70 : 71 : 72 : 73 : 74 : 75 : 78


##########################################################

#

# SMTP AUTHENTICATION

#

###########################################################

begin authenticators

PLAIN:
driver = plaintext
public_name = PLAIN
#server_advertise_condition = ${if def:tls_cipher }
#server_debug_print = test
#sever_mail_auth_condition = 
server_set_id = $auth2
no_client_ignore_invalid_base64
#client_send = ": username : password"
client_send = 
server_condition = ${if saslauthd{{$2}{$3}{smtp}} {1}}
server_prompts = "congrates"

LOGIN:
driver = plaintext
public_name = LOGIN
#server_advertise_condition = ${if def:tls_cipher }
#server_debug_print = 
#server_mail_auth_condition = 
server_set_id = $auth1
no_client_ignore_invalid_base64
client_send = 
server_condition = ${if saslauthd{{$1}{$2}{smtp}} {1}}
server_prompts = <| Username: | Password:


#PLAIN:
  #driver                     = plaintext
  #public_name		     = PLAIN
  #server_set_id              = $auth2
  #server_prompts             = :
  #server_condition           = ${if saslauthd{{$2}{$3}{smtp}} {1}}
  #server_advertise_condition = ${if def:tls_cipher }

# LOGIN authentication has traditional prompts and responses. There is no
# authorization ID in this mechanism, so unlike PLAIN the username and
# password are $auth1 and $auth2. Apart from that you can use the same
# server_condition setting for both authenticators.

#LOGIN:
  #driver                     = plaintext
  #public_name		     = LOGIN
  #server_set_id              = $auth1
  #server_prompts             = <| Username: | Password:
  #server_condition           = ${if saslauthd{{$1}{$2}{smtp}} {1}}
 # server_advertise_condition = ${if def:tls_cipher }

#dovecot_login:
  #driver = plaintext 
  #public_name = LOGIN
  #erver_socket = /usr/libexec/dovecot/dovecot-auth
# setting server_set_id might break several headers in mails sent by authenticated smtp. So be careful.
  #server_set_id = $auth1

#dovecot_plain:
  #driver = plaintext
  #public_name = PLAIN
  #server_socket = /var/run/dovecot/login/default
  #server_set_id = $auth1


###########################################################

#

#RETRY CONFIGURATION

#

###########################################################

begin retry

# Retry..

# Then..

# Finally..

# Domain

* * F,2h,10m; F,24h,1h; F,4d,6h

# end of /etc/exim/exim.conf


