# /etc/exim4/exim4.conf

# ====================================================================
# Main section

# Macros
LOCAL_DOMAIN     = […]
MAILBOX_RP       = […]
MAILBOX          = […]
SMTP_SERVER_PORT = submission
SMTP_SERVER      = […]
SMTP_USERNAME    = […]
SMTP_PASSWORD    = […]

# Options
local_interfaces    = <; ::1 ; 127.0.0.1
qualify_domain      = LOCAL_DOMAIN
log_selector        = +all -subject
local_from_check    = false
trusted_users       = […]
tls_advertise_hosts =
keep_environment    =

# ====================================================================
begin routers

local_to_mailbox:
 driver = redirect
 domains = LOCAL_DOMAIN
 data = MAILBOX

all_via_smtp_server:
 driver = manualroute
 transport = smtp_server
 route_list = * SMTP_SERVER byname

# ====================================================================
begin transports

smtp_server:
 driver = smtp
 port = SMTP_SERVER_PORT
 return_path = MAILBOX_RP
 hosts_require_tls = $host_address
 hosts_require_auth = $host_address

# ====================================================================
begin retry

# PATTERN ERROR [SENDER-ADDRESSES] RETRY-PARAMETERS
*         *                        F,2h,15m; G,16h,1h,1.5; F,4d,6h;

# ====================================================================
begin authenticators

login:
 driver = plaintext
 public_name = LOGIN
 hide client_send = : SMTP_USERNAME : SMTP_PASSWORD
