Re: [exim] Archiving Problems

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Dean Bishop
Data:  
Para: Todd Lyons
CC: exim users
Assunto: Re: [exim] Archiving Problems
Arg. This is so frustrating. Try as I might I just don't see anything of the sort in the routers. Is it possible that it's handled in another way?

I've attached just the routers and the whole bloody config. I'll buy you beer :) it'd be cheaper than replacement hair therapy.

Thanks,
dean



-----Original Message-----
From: exim-users-bounces+dbishop=rocksolidhq.com@??? [mailto:exim-users-bounces+dbishop=rocksolidhq.com@exim.org] On Behalf Of Todd Lyons
Sent: Thursday, December 01, 2011 3:16 PM
To: Dean Bishop
Cc: exim users
Subject: Re: [exim] Archiving Problems

On Thu, Dec 1, 2011 at 12:07 PM, Dean Bishop <dbishop@???> wrote:
> Grrrr....still can't seem to get this working.  I'm at my wit's end.  If I understand this correctly the incoming_archiver router is passing messages to the router even though they are directed to non-existent accounts/aliases.


Right. So whatever test you do to determine if it's an existing user or alias in the respective router, you also need to do on this archive router.

...Todd

--
If Americans could eliminate sugary beverages, potatoes, white bread, pasta, white rice and sugary snacks, we would wipe out almost all the problems we have with weight and diabetes and other metabolic diseases. -- Dr. Walter Willett, Harvard School of Public Health

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


begin routers


#!!# If we are trying to deliver to a remote mailman domain that is on the localhost
#!!# let it go though even if its not in /etc/localdomains since mailman will eat
#!!# up 100% of the cpu if we don't

mailman_virtual_router:
    driver = accept
    require_files = /usr/local/cpanel/3rdparty/mailman/lists/${lc::$local_part}_${lc::$domain}/config.pck
    local_part_suffix_optional
    local_part_suffix = -admin     : \
            -bounces   : -bounces+* : \
                        -confirm   : -confirm+* : \
            -join      : -leave     : \
            -owner       : -request   : \
            -subscribe : -unsubscribe
    transport = mailman_virtual_transport

mailman_virtual_router_nodns:
    driver = accept
    require_files = /usr/local/cpanel/3rdparty/mailman/lists/${lc::$local_part}/config.pck
    condition    = \
           ${if or {{match{$local_part}{.*_.*}} \
                     {eq{$local_part}{mailman}}} \
                {1}{0}}
    local_part_suffix_optional
    local_part_suffix = -admin     : \
            -bounces   : -bounces+* : \
                        -confirm   : -confirm+* : \
            -join      : -leave     : \
            -owner       : -request   : \
            -subscribe : -unsubscribe
    domains = +local_domains
    transport = mailman_virtual_transport_nodns




######################################################################
#                      ROUTERS CONFIGURATION                         #
#            Specifies how remote addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#  A remote address is passed to each in turn until it is accepted.  #
######################################################################

# Remote addresses are those with a domain that does not match any item
# in the "local_domains" setting above.

#
# Demo Safety Router
#

democheck:
    driver = redirect
    require_files = "+/etc/demouids"
    condition = "${if eq {${lookup {$originator_uid} lsearch {/etc/demouids} {$value}}}{}{false}{true}}"
    allow_fail
    data = :fail: demo accounts are not permitted to relay email

# Dean's Archiver Router
outgoing_archiver:
# works but duplicates messages sent from local to a local alias
condition = ${if and {{exists{${extract{5}{:}{${lookup passwd{${lookup{$sender_address_domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/mail/$sender_address_domain/$sender_address_local_part}}{!eq{$sender_address_local_part}{root}}{!def:h_Archive_Copy:} }  }
debug_print = true
unseen
no_expn
verify
transport = outgoing_local_copy
driver = accept

incoming_archiver:
#condition = ${if and {{exists{${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/passwd}}{!eq{$local_part}{root}}}  }
#condition = ${if and {{eq{lsearch;${extract{5}{:}{${lookup passwd{${lookup{$sender_address_domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$sender_address_domain/passwd}{$sender_address_local_part}}{eq{lsearch;/etc/valiases/$sender_address_domain}{$sender_address_local_part} }}}
#condition = ${if and {{exists{${extract{5}{:}{${lookup passwd{${lookup{$sender_address_domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}}}}{exists{${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}}}}}  }
###
### Need to ensure that this address exists as an account or alias
###  should be able to do this by ensuring that it is in
###  /etc/valiases/$domain
###
#condition = ${if {lookup {$local_part}lsearch;{/etc/valiases/$doamin}fail}}
no_expn
no_verify
unseen
domains = +local_domains
local_parts = lsearch;${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/passwd
transport = incoming_local_copy
driver = accept
# This router routes to remote hosts over SMTP using a DNS lookup with
# default options.

#
# Handles nobody and webspam and mail trap checks in checkspam2 and gives a userful error
#

checkspam2:
    domains = ! +local_domains
    condition = "${perl{checkspam2}}"
    driver = redirect
    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 64.94.110.0/24
    allow_fail
    data = "${perl{checkspam2_results}}"

#
# Handles nobody and webspam and mail trap checks in checkspam2 and gives a userful error
#
trackbandwidth:
    domains = ! +local_domains
    condition = "${perl{trackbandwidth}}"
    driver = redirect
    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 64.94.110.0/24
    allow_fail
    verify = false
    data = "${perl{trackbandwidth_results}}"

#
# Lookup host router for remote smtp and ignores verisign site finder 'service' and uses domain keys
#
    
dk_lookuphost:
    driver = dnslookup
    domains = ! +local_domains
    #ignore verisign to prevent waste of bandwidth
    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 64.94.110.0/24
    require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}" 
    headers_add = "${perl{mailtrapheaders}}"
    transport = dk_remote_smtp
    
#
# Lookup host router for remote smtp and ignores verisign site finder 'service'
#
    
lookuphost:
    driver = dnslookup
    domains = ! +local_domains
    #ignore verisign to prevent waste of bandwidth
    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 64.94.110.0/24
    headers_add = "${perl{mailtrapheaders}}"
    transport = remote_smtp

# This router routes to remote hosts over SMTP by explicit IP address,
# given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
# require this facility, which is why it is enabled by default in Exim.
# If you want to lock it out, set forbid_domain_literals in the main
# configuration section above.

#
# Literal Transports .. ignores verisigns sitefinder service
#

literal:
    driver = ipliteral
    domains = ! +local_domains
    headers_add = "${perl{mailtrapheaders}}"
    ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 64.94.110.0/24
    transport = remote_smtp




#!!# This new router is put here to fail all domains that
#!!# were not in local_domains in the Exim 3 configuration.

#
# Trap Failures to Remote Domain
#

fail_remote_domains:
  driver = redirect
  domains = ! +local_domains : ! localhost : ! localhost.localdomain
  allow_fail
  data = ":fail: The mail server could not deliver mail to $local_part@$domain.  The account or domain may not exist, th
ey may be blacklisted, or missing the proper dns entries."