1 #################################
2 # The routers that handle the actual local delivery of mail. These routers all
3 # work just on the localhost "domain", so any previous routers that want to
4 # have mail delivered locally should redirect to username@localhost and set
5 # redirect_router to "local_delivery". These routers are not used directly on
6 # incoming messages, the first router guarantees this.
8 # These routers support .forward files, procmail and mbox delivery in
9 # /var/mail, each tried in turn.
10 #################################
13 # Dummy noop router, that ensures that these routers are never called directly
14 # on an incoming message and enforces that they only be called when a previous
15 # router explicitely sets redirect_router to local_delivery.
17 debug_print = "R: local_delivery for $local_part@$domain"
21 cannot_route_message = "Internal error"
23 # Dummy noop router, that can be used by other routers for the value of
24 # redirect_router or pass_router, without being dependent on the (order of)
25 # actual delivery routers below.
27 debug_print = "R: local_delivery for $local_part@$domain"
31 # This router handles forwarding using traditional .forward files in users'
32 # home directories. It also allows mail filtering with a forward file
33 # starting with the string "# Exim filter" or "# Sieve filter".
35 # The no_verify setting means that this router is skipped when Exim is
36 # verifying addresses. Similarly, no_expn means that this router is skipped if
37 # Exim is processing an EXPN command.
39 # The check_ancestor option means that if the forward file generates an
40 # address that is an ancestor of the current one, the current one gets
41 # passed on instead. This covers the case where A is aliased to B and B
42 # has a .forward file pointing to A.
44 # The four transports specified at the end are those that are used when
45 # forwarding generates a direct delivery to a directory, or a file, or to a
46 # pipe, or sets up an auto-reply, respectively.
48 # Any syntax errors in the .forward are sent with the real- prefix, which the
49 # real_local router directly delivers through the maildir_home transport,
50 # avoiding the routers in this file.
52 debug_print = "R: userforward for $local_part@$domain"
57 require_files = $local_part:$home/.forward
62 forbid_smtp_code = true
63 directory_transport = address_directory
64 file_transport = address_file
65 pipe_transport = address_pipe
66 reply_transport = address_reply
68 syntax_errors_to = real-$local_part@$domain
69 syntax_errors_text = \
70 This is an automatically generated message. An error has\n\
71 been found in your .forward file. Details of the error are\n\
72 reported below. While this error persists, you will receive\n\
73 a copy of this message for every message that is addressed\n\
74 to you. If your .forward file is a filter file, or if it is\n\
75 a non-filter file containing no valid forwarding addresses,\n\
76 a copy of each incoming message will be put in your normal\n\
77 mailbox. If a non-filter file contains at least one valid\n\
78 forwarding address, forwarding to the valid addresses will\n\
79 happen, and those will be the only deliveries that occur.
81 # Let procmail deliver the message if a global or local (in the user's
82 # homedir) procmailrc exists.
84 debug_print = "R: procmail for $local_part@$domain"
88 transport = procmail_pipe
89 # emulate OR with "if exists"-expansion
90 require_files = ${local_part}:\
91 ${if exists{/etc/procmailrc}\
92 {/etc/procmailrc}{${home}/.procmailrc}}:\
97 # This router delivers to /var/mail.
99 debug_print = "R: local_user for $local_part@$domain"
104 transport = maildir_home
105 # If we get here, some previous router redirected to a non-existing user.
106 # That should not happen!
107 cannot_route_message = Unknown user: This should not happen
109 # vim: set sts=2 expandtab sw=2 ai: