Re: [exim] unrouteable address from alias on internal host

Etusivu
Poista viesti
Vastaa
Lähettäjä: Rob
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] unrouteable address from alias on internal host
Giuliano Gavazzi wrote:
> why don't you send us the routers section of your external smtp server
> configuration?
>
> g
>

Sure thing, it originally came from http://www.jcdigita.com/eximconfig/

begin routers


# Verify sender address of remote senders
verify_sender_remote:
    driver    = dnslookup
    transport = remote_smtp
    domains   = ! +local_domains : ! +relay_domains
    #
    # Ignore sender domain names that point to local host and/or 
specific hosts.
    #
    ignore_target_hosts = IGNORE_TARGET_HOSTS : +local_hosts : +relay_hosts
    #
    # Don't want to qualify single-component names with default domain for
    # remote hosts!
    #
    qualify_single = false
    #
    # Verify sender only.
    #
    verify_recipient = false
    verify_sender    = true
    verify_only



# Verify sender address of relay senders (Always passes verification.)
#
# (Relay domain names will probably point to this host that is acting
# as the gateway.  These would be rejected if a normal dnslookup is
# done on them for verification due to them pointing at the local
# host (Even though they will be routed elsewhere after being accepted!))
#
verify_sender_relay:
    driver    = accept
    transport = remote_smtp
    domains   = +relay_domains
    #
    verify_recipient = false
    verify_sender    = true
    verify_only



# Inbound messages to explicit IP address (Given as a 'domain literal' 
in the
# form user@[nnn.nnn.nnn.nnn])  -  See:  config/ip_domain_literals
#
inbound_ipliteral:
    driver     = ipliteral
    transport  = remote_smtp
    domains    = ! +local_domains : ! +relay_domains
    #
    # Verify recipient only.
    #
    verify_recipient = true
    verify_sender    = false



# Route directly over SMTP to an explicit IP address (Given as a 'domain
# literal' in the form user@[nnn.nnn.nnn.nnn])  (Outbound messages.)
#
# See:  config/ip_domain_literals
#
outbound_ipliteral:
    driver    = ipliteral
    transport = remote_smtp
    #
    condition = "${if or { \
           {eq {$sender_address_domain}{HOSTNAME}} \
           {eq 
{${lookup{$sender_address_domain}lsearch{CONFIGDIR/domains/local}{FOUND}{}}}{FOUND}} 
\
           {eq 
{${lookup{$sender_address_domain}lsearch{CONFIGDIR/domains/relay}{FOUND}{}}}{FOUND}} 
\
           } {1}{0}}"
    #
    # Ignore ipliterals that point to localhost and/or specific hosts.
    #
    ignore_target_hosts = IGNORE_TARGET_HOSTS
    #
    # Verify recipient only.
    #
    verify_recipient = true
    verify_sender    = false



# Route via ISP smarthost(s) (Outbound messages.)
#
# See:  route/smart
#
# NOTE:  Add direct- to recipient address to force direct SMTP sending.
#        Add smart- to recipient address to force ISP smarthost sending.
#
outbound_smarthost_isp:
    driver     = manualroute
    transport  = smart_smtp
    domains    = ! +local_domains : ! +relay_domains : ! +direct_domains
    route_data = 
${lookup{$sender_address_domain}wildlsearch{CONFIGDIR/hosts/smart}}
    #
    condition  = "${if and {\
         {eq {$h_X-Send-Direct:}{}} \
                  {!eq 
{${lookup{$sender_address_domain}wildlsearch{CONFIGDIR/route/direct}{FOUND}{}}}{FOUND}} 
\
         {eq {${if or { \
             {!eq {$h_X-Send-Smart:}{}} \
                      {eq 
{${lookup{$sender_address_domain}wildlsearch{CONFIGDIR/route/smart}{FOUND}{}}}{FOUND}} 
\
                      {eq 
{${lookup{$domain}wildlsearch{CONFIGDIR/route/recipient_smart}{FOUND}{}}}{FOUND}} 
\
           } {1}{0}}}{1}} \
         } {1}{0}}"
    #
    # Ignore sender domain names that point to localhost and/or specific 
hosts.
    #
    ignore_target_hosts = IGNORE_TARGET_HOSTS
    #
    no_verify



# Route directly via SMTP (Outbound messages.)
outbound_direct:
    driver    = dnslookup
    transport = remote_smtp
    domains   = ! +local_domains : ! +relay_domains
    #
    condition = "${if or { \
           {eq {$sender_address}{}} \
           {eq {$sender_address_domain}{HOSTNAME}} \
           {eq 
{${lookup{$sender_address_domain}lsearch{CONFIGDIR/domains/local}{FOUND}{}}}{FOUND}} 
\
           {eq 
{${lookup{$sender_address_domain}lsearch{CONFIGDIR/domains/relay}{FOUND}{}}}{FOUND}} 
\
           } {1}{0}}"
    #
    # Ignore sender domain names that point to localhost and/or specific 
hosts.
    #
    ignore_target_hosts = IGNORE_TARGET_HOSTS
    #
    # Verify recipient only.
    #
    verify_recipient = true
    verify_sender    = false



# Route relayed domain names to correct destination host(s) (Inbound 
messages.)
#
# See:  route/relay
#
inbound_smarthost_relay:
    driver     = manualroute
    transport  = remote_smtp
    domains    = ! +local_domains : +relay_domains
    route_data = ${lookup{$domain}wildlsearch{CONFIGDIR/route/relay}}
    #
    # Verify relay recipient using LDAP server(s)?
    #
    condition = ${if or { \
                {!eq {CHECK_RELAY_LDAP}{Yes}} \
                 {!eq {${lookup ldap 
{ldap:///RELAY_LDAP_CONTEXT?mail?sub?${expand:RELAY_LDAP_QUERY}}{$value}{}}}{}} 
\
            } {yes}{no}}
    #
    # Verify recipient only.
    #
    verify_recipient = true
    verify_sender    = false



# This allows local delivery to be forced, avoiding alias files and
# forwarding.  This router is for Maildir mailboxes.
#
real_local_maildir:
    driver    = accept
    transport = local_delivery_maildir
    domains   = +local_domains
    check_local_user
    require_files = ${local_part}:+${home}:+${home}/Maildir
    local_part_prefix = real-



# This allows local delivery to be forced, avoiding alias files and
# forwarding.
#
real_local:
    driver    = accept
    transport = local_delivery
    domains   = +local_domains
    check_local_user
    local_part_prefix = real-



# This director handles aliasing using a traditional /etc/aliases file.
# 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.
system_aliases:
    driver  = redirect
    domains = +local_domains
    allow_defer
    allow_fail
    data = ${lookup{$local_part}lsearch{/etc/aliases}}
    file_transport = address_file
    pipe_transport = address_pipe
    #
    # Note that user and group are set/overriden in the transports
    #
    #user = mail
    #group = mail
    retry_use_local_part


        
# This director runs procmail for users who have a .procmailrc file
procmail:
    driver    = accept
    transport = procmail_pipe
    domains   = +local_domains
    check_local_user
    require_files = 
${local_part}:+${home}:+${home}/.procmailrc:+/usr/bin/procmail
    #
    no_verify

    

# Holiday auto-response
user_vacation:
    driver    = accept
    transport = vacation_reply
    domains   = +local_domains
    check_local_user
    #
    # Do not reply to errors or lists
    #
    condition = "${if or {{match {$h_precedence:}{(?i)junk|bulk|list}} \
                 {eq {$sender_address}{}} {eq {$local_part}{root}}} 
{no}{yes}}"
    no_expn
    require_files = ${local_part}:${home}/.vacation.msg
    #
    # Do not reply to errors and bounces or lists
    #
    senders = " ! ^.*-request@.*: \
               ! ^owner-.*@.*: \
           ! ^postmaster@.*: \
           ! ^listmaster@.*: \
           ! ^mailer-daemon@.* \
           ! ^root@.*"
    unseen
    user = ${local_part}
    #
    no_verify

                                    

# This router handles forwarding using traditional .forward files.
# It also allows mail filtering when a forward file starts with the
# string "# Exim filter": To disable filtering, uncomment the "filter"
# option. 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.
#
# For standard debian setup of one group per user, it is acceptable---normal
# even---for .forward to be group writable. If you have everyone in one
# group, you should comment out the "modemask" line. Without it, the exim
# default of 022 will apply, which is probably what you want.

userforward:
    driver  = redirect
    domains = +local_domains
    allow_filter
    check_ancestor
    check_local_user
    #
    # Not specifying the directory forces exim to do a stat on $home 
first, and
    # defer if NFS is hosed.
    #
    file = $home/.forward
    file_transport = address_file
    #
    # See spec file chapter 41.7
    #
    local_part_suffix = +*
    local_part_suffix_optional
    modemask = 002
    pipe_transport = address_pipe
    reply_transport = address_reply
    #
    no_verify
    no_expn



# This router matches local user Maildir mailbox.
localuser_maildir:
    driver    = accept
    transport = local_delivery_maildir
    domains   = +local_domains
    check_local_user
    require_files = ${local_part}:+${home}:+${home}/Maildir



# This router matches local user mailboxes.
localuser:
    driver    = accept
    transport = local_delivery
    domains   = +local_domains
    check_local_user