Exim Setup for use with Dovecot
All configuration for Exim is in the /etc/exim/exim.conf
file.
Use Exim to deliver local mail to Dovecot users
To deliver mail to a Dovecot user the email content can be piped to
the dovecot local delivery agent dovecot-lda
.
begin transports
# lots more lines here...
dovecot_virtual_delivery:
driver = pipe
command = /usr/libexec/dovecot/dovecot-lda -d $local_part@$domain -f $sender_address
message_prefix =
message_suffix =
delivery_date_add
envelope_to_add
log_output
user = dovecot
temp_errors = 64 : 69 : 70 : 71 : 72 : 73 : 74 : 75 : 78
temp_errors
is an array of return values from the dovecot-lda
executable and will result in a non-fatal error code that indicates
to the sender that the delivery will be retried later. Otherwise
the error code will be fatal.
Add a routing to the routers section of the configuration file before
localuser
:
begin routers
# more stuff...
dovecot_virtual:
driver = accept
transport = dovecot_virtual_delivery
localuser:
Use Dovecot to Authenticate Exim Users
Dovecot is an IMAP and POP3 server (both still used a lot) and EXIM can be used to deliver email to Dovecot mail boxes. But then now to send external email using EXIM?
Exim User Authentication via Dovecot
begin authenticators
dovecot_login:
driver = dovecot
public_name = LOGIN
server_socket = /var/run/dovecot/auth-client
dovecot_plain:
driver = dovecot
public_name = PLAIN
server_socket = /var/run/dovecot/auth-client
Exim must be able to open the socket at /var/run/dovecot/auth-client
.
Modify the dovecot configuration to set the group to mail
in
/etc/dovecot/conf.d/10-master.conf
:
service auth {
# maybe more stuff...
unix_listener auth-client {
mode = 0660
user = dovecot
group = mail
}
# maybe more stuff...
}
Auto Responder (Out-of-Office)
To configure the out of office auto responder you must add the sieve plugin to the Dovecot configuration.