###################################################################### # ROUTERS CONFIGURATION # # Specifies how addresses are handled # ###################################################################### # THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT! # # An address is passed to each router in turn until it is accepted. # ###################################################################### begin routers # This router routes to remote hosts over SMTP by explicit IP address, # when an email address is given in "domain literal" form, for example, # . The RFCs require this facility. However, it is # little-known these days, and has been exploited by evil people seeking # to abuse SMTP relays. Consequently it is commented out in the default # configuration. If you uncomment this router, you also need to uncomment # allow_domain_literals above, so that Exim can recognize the syntax of # domain literal addresses. # domain_literal: # driver = ipliteral # domains = ! +local_domains # transport = remote_smtp localrouting: domains = ! +local_domains transport = remote_smtp ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1 driver = manualroute route_data = ${lookup{$domain}lsearch*{SMTPMAP}} host_find_failed = ignore host_all_ignored = pass # This router routes addresses that are not in local domains by doing a DNS # lookup on the domain name. The exclamation mark that appears in "domains = ! # +local_domains" is a negating operator, that is, it can be read as "not". The # recipient's domain must not be one of those defined by "domainlist # local_domains" above for this router to be used. # # If the router is used, any domain that resolves to 0.0.0.0 or to a loopback # interface address (127.0.0.0/8) is treated as if it had no DNS entry. Note # that 0.0.0.0 is the same as 0.0.0.0/32, which is commonly treated as the # local host inside the network stack. It is not 0.0.0.0/0, the default route. # If the DNS lookup fails, no further routers are tried because of the no_more # setting, and consequently the address is unrouteable. dnslookup: driver = dnslookup domains = ! +local_domains transport = signed_smtp ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1 no_more # This alternative router can be used when you want to send all mail to a # server which handles DNS lookups for you; an ISP will typically run such # a server for their customers. If you uncomment "smarthost" then you # should comment out "dnslookup" above. Setting a real hostname in route_data # wouldn't hurt either. # smarthost: # driver = manualroute # domains = ! +local_domains # transport = remote_smtp # route_data = MAIL.HOSTNAME.FOR.CENTRAL.SERVER.EXAMPLE # ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1 # no_more # The remaining routers handle addresses in the local domain(s), that is those # domains that are defined by "domainlist local_domains" above. # This router handles aliasing using a linearly searched alias file with the # name /etc/mail/aliases. When this configuration is installed automatically, # the name gets inserted into this file from whatever is set in Exim's # build-time configuration. The default path is the traditional /etc/aliases. # If you install this configuration by hand, you need to specify the correct # path in the "data" setting below. # ##### NB You must ensure that the alias file exists. It used to be the case ##### NB that every Unix had that file, because it was the Sendmail default. ##### NB These days, there are systems that don't have it. Your aliases ##### NB file should at least contain an alias for "postmaster". # # If any of your aliases expand to pipes or files, you will need to set # up a user and a group for these deliveries to run under. You can do # this by uncommenting the "user" option below (changing the user name # as appropriate) and adding a "group" option if necessary. Alternatively, you # can specify "user" on the transports that are used. Note that the transports # listed below are the same as are used for .forward files; you might want # to set up different ones for pipe and file deliveries from aliases. system_aliases: driver = redirect allow_fail allow_defer data = ${lookup{$local_part}lsearch{/etc/mail/aliases}} # user = exim file_transport = address_file pipe_transport = address_pipe mail_aliases: driver = redirect allow_fail allow_defer data = ${lookup{$local_part@$domain}lsearch{ALIASMAP}} file_transport = address_file pipe_transport = address_pipe # This router handles forwarding using traditional .forward files in users' # home directories. If you want it also to allow mail filtering when a forward # file starts with the string "# Exim filter" or "# Sieve filter", uncomment # the "allow_filter" option. # 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. # If you want this router to treat local parts with suffixes introduced by "-" # or "+" characters as if the suffixes did not exist, uncomment the two local_ # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated # in the same way as xxxx@your.domain by this router. Because this router is # not used for verification, if you choose to uncomment those options, then you # will *need* to make the same change to the localuser router. (There are # other approaches, if this is undesirable, but they add complexity). # 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 three transports specified at the end are those that are used when # forwarding generates a direct delivery to a file, or to a pipe, or sets # up an auto-reply, respectively. #userforward: # driver = redirect # check_local_user # local_part_suffix = +* : -* # local_part_suffix_optional # file = $home/.forward # allow_filter # no_verify # no_expn # check_ancestor # file_transport = address_file # pipe_transport = address_pipe # reply_transport = address_reply # This router matches local user mailboxes. If the router fails, the error # message is "Unknown user". # If you want this router to treat local parts with suffixes introduced by "-" # or "+" characters as if the suffixes did not exist, uncomment the two local_ # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated # in the same way as xxxx@your.domain by this router. #localuser: # driver = accept # check_local_user # local_part_suffix = +* : -* # local_part_suffix_optional # transport = local_delivery # cannot_route_message = Unknown user localuser: transport = remote_lmtp domains = +local_domains driver = manualroute route_data = ${lookup{$domain}lsearch*{LMTPMAP}} host_find_failed = ignore host_all_ignored = defer