[exim] Optimizing routers

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Brian Blood
Dátum:  
Címzett: Exim-users List
Tárgy: [exim] Optimizing routers
I'm reworking our exim config and was trying to eliminate/optimize
some lookups and wanted a 2nd (or more opinion) on the tack I'm
taking....

The basic premise is making my list of routers utilize information
I've already picked up in the acl phase (is sender local, is recip
local).
I'm mostly interested in making sure I'm not missing anything in my
logic of what I'm expecting to happen.
TIA

In acl_mail_from, I'm looking up the $sender_address_domain like so:

#----------------------------------------------------------------- ACL  
MAIL FROM
##  Lookup the information on the sender address to see if it's local
#
warn
   set acl_m_sender_islocal  = false
   set acl_c_sender_dbrec    = ${lookup mysql{LOOKUP_SENDER_DOMAIN} 
{$value}{}}
   set acl_m_sender_siteid   = ${extract{site_id}{$acl_c_sender_dbrec} 
{$value}{0}}
   condition                 = ${if >{$acl_m_sender_siteid}{0}}
   set acl_m_sender_islocal  = true




and in acl_rcpt_to:

#----------------------------------------------------------------- ACL  
RCPT TO
##  Lookup the information on the recipient address to see if it's local
warn
   set acl_m_rcpt_islocal = false
   set acl_c_rcpt_dbrec   = ${lookup mysql{LOOKUP_RCPT_DOMAIN}{$value} 
{}}
   set acl_m_rcpt_siteid  = ${extract{site_id}{$acl_c_rcpt_dbrec} 
{$value}{0}}
   condition              = ${if >{$acl_m_rcpt_siteid}{0}}
   set acl_m_rcpt_islocal = true



And then later on if the sender or recipient is not local, call verify
on the address, potentially doing a callout (smarthost or not smarthost)

warn
condition = !$acl_m_sender_islocal
set acl_m_sender_verified = false
verify = sender/CALLOUT_OPTS
set acl_m_sender_verified = true


### ------------------
These are #2 and #3 in my list of routers

## This should be called when an acl calls verify = sender
non_local_sender_verify:
driver = dnslookup
condition = !$acl_m_sender_islocal
# domains = ! +local_domains
verify_only
verify_sender = true
verify_recipient = false
same_domain_copy_routing
ignore_target_hosts = +special_ipv4
mx_domains
self = fail
no_more


## This should be called when an acl calls verify = recipient
non_local_recipient_verify:
driver = dnslookup
verify_only
verify_sender = false
verify_recipient = true
condition = !$acl_m_rcpt_islocal
ignore_target_hosts = +special_ipv4
same_domain_copy_routing
self = fail
# domains = ! +local_domains



a bit further down the list:

.ifdef USE_SMART_HOST
## Outbound email
send_to_smart_host:
driver = manualroute
condition = !$acl_m_rcpt_islocal
# domains = ! +local_domains
route_list = * SMARTHOST
transport = remote_smtp
same_domain_copy_routing
retry_use_local_part = false
no_verify
no_more
.endif