# redirect_router to "local_delivery". These routers are not used directly on
# incoming messages, the first router guarantees this.
#
-# These routers support .forward files, procmail and mbox delivery in
-# /var/mail, each tried in turn.
+# Currently, there is only a single router that uses dovecot's deliver program
+# to deliver the mail, but others could be (re)added when required.
#################################
driver = redirect
data =
-# This router handles forwarding using traditional .forward files in users'
-# home directories. It also allows mail filtering with a forward file
-# starting with the string "# Exim filter" or "# Sieve filter".
-#
-# The no_verify setting means that this router is skipped when Exim is
-# verifying addresses. Similarly, no_expn means that this router is skipped if
-# Exim is processing an EXPN command.
-#
-# The check_ancestor option means that if the forward file generates an
-# address that is an ancestor of the current one, the current one gets
-# passed on instead. This covers the case where A is aliased to B and B
-# has a .forward file pointing to A.
-#
-# The four transports specified at the end are those that are used when
-# forwarding generates a direct delivery to a directory, or a file, or to a
-# pipe, or sets up an auto-reply, respectively.
-#
-# Any syntax errors in the .forward are sent with the real- prefix, which the
-# real_local router directly delivers through the maildir_home transport,
-# avoiding the routers in this file.
-userforward:
- debug_print = "R: userforward for $local_part@$domain"
- driver = redirect
- domains = localhost
- check_local_user
- file = $home/.forward
- require_files = $local_part:$home/.forward
- no_verify
- no_expn
- check_ancestor
- allow_filter
- forbid_smtp_code = true
- directory_transport = address_directory
- file_transport = address_file
- pipe_transport = address_pipe
- reply_transport = address_reply
- skip_syntax_errors
- syntax_errors_to = real-$local_part@$domain
- syntax_errors_text = \
- This is an automatically generated message. An error has\n\
- been found in your .forward file. Details of the error are\n\
- reported below. While this error persists, you will receive\n\
- a copy of this message for every message that is addressed\n\
- to you. If your .forward file is a filter file, or if it is\n\
- a non-filter file containing no valid forwarding addresses,\n\
- a copy of each incoming message will be put in your normal\n\
- mailbox. If a non-filter file contains at least one valid\n\
- forwarding address, forwarding to the valid addresses will\n\
- happen, and those will be the only deliveries that occur.
-
-# Let procmail deliver the message if a global or local (in the user's
-# homedir) procmailrc exists.
-procmail:
- debug_print = "R: procmail for $local_part@$domain"
- driver = accept
- domains = localhost
- check_local_user
- transport = procmail_pipe
- # emulate OR with "if exists"-expansion
- require_files = ${local_part}:\
- ${if exists{/etc/procmailrc}\
- {/etc/procmailrc}{${home}/.procmailrc}}:\
- +/usr/bin/procmail
- no_verify
- no_expn
-
-# This router delivers to /var/mail.
-local_user:
- debug_print = "R: local_user for $local_part@$domain"
+# This router uses dovecot_deliver for delivery
+dovecot_deliver:
+ debug_print = "R: dovecot_deliver for $local_part@$domain"
driver = accept
domains = localhost
check_local_user
local_parts = ! root
- transport = maildir_home
+ transport = dovecot_deliver
# If we get here, some previous router redirected to a non-existing user.
# That should not happen!
cannot_route_message = Unknown user: This should not happen