[exim] Confused about routers and -bh mode testing

Top Page
Delete this message
Reply to this message
Author: Gary Allen Vollink
Date:  
To: exim-users
Subject: [exim] Confused about routers and -bh mode testing
I'm testing an exim configuration file with:
% exim -bh 192.168.1.66

To me, it looks like it's selecting a router based on what I put in
"mail from:" as opposed to the address in "rcpt to:". I'm not
completely new to Exim, and it's ways, but this seems like it will
mis-route my mail (which would be a bad thing).

Perhaps I'm just doing something stupid, if someone see's something
wrong and could help me out, I would appreciate it...

I have routers set up like this:

========
begin routers

insidehost:
driver = manualroute
transport = remote_smtp
route_list = *me.co.uk svr-exchange.ad.me.co.uk

ushost:
driver = manualroute
transport = remote_smtp
route_list = *me.com mail.me.com

external:
driver = manualroute
transport = remote_smtp
route_list = * mail.myisp.co.uk

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
========

And my test session goes like this...

[root@cvlnx01 exim]# exim -bh 192.168.1.66

**** SMTP testing session as if from host 192.168.1.66
**** but without any ident (RFC 1413) callback.
**** This is not for real!

>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? yes (matched "*")
>>> looking up host name for 192.168.1.66
>>> IP address lookup yielded svr-exchange.ad.me.co.uk
>>> gethostbyname looked up these IP addresses:
>>> name=svr-exchange.ad.me.co.uk address=192.168.1.66
>>> checking addresses for svr-exchange.ad.me.co.uk
>>> 192.168.1.66 OK
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)

220 cvlnx01.me.co.uk ESMTP Exim 4.51 Fri, 13 May 2005 17:18:00 +0100
helo mailgate.me.co.uk
250 cvlnx01.me.co.uk Hello svr-exchange.ad.me.co.uk [192.168.1.66]
mail from: gv@???
250 OK
rcpt to: gavollink@???
>>> using ACL "acl_check_rcpt"
>>> processing "accept"
>>> check hosts = :
>>> host in ":"? no (end of list)
>>> accept: condition test failed
>>> processing "deny"
>>> check domains = +local_domains
>>> gmail.com in ""? no (end of list)
>>> gmail.com in "+local_domains"? no (end of list)
>>> deny: condition test failed
>>> processing "deny"
>>> check domains = !+local_domains
>>> gmail.com in "!+local_domains"? yes (end of list)
>>> check local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
>>> gavollink in "^[./|] : ^.*[@%!] : ^.*/\.\./"? no (end of list)
>>> deny: condition test failed
>>> processing "accept"
>>> check local_parts = postmaster
>>> gavollink in "postmaster"? no (end of list)
>>> accept: condition test failed
>>> processing "require"
>>> check verify = sender
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> routing gv@???
>>> calling insidehost router
>>> me.co.uk in "*me.co.uk"? yes (matched "*me.co.uk")
>>> routed by insidehost router
>>> ----------- end verify ------------
>>> require: condition test succeeded
>>> processing "accept"
>>> check domains = +relay_to_domains
>>> gmail.com in "*me.co.uk : me.com"? no (end of list)
>>> gmail.com in "+relay_to_domains"? no (end of list)
>>> accept: condition test failed
>>> processing "accept"
>>> check hosts = +relay_from_hosts
>>> host in "127.0.0.1 : 192.168.1.66"? yes (matched "192.168.1.66")
>>> host in "+relay_from_hosts"? yes (matched "+relay_from_hosts")
>>> accept: condition test succeeded

250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
Test
.
>>> host in ignore_fromline_hosts? no (option unset)
>>> using ACL "acl_check_data"
>>> processing "deny"
>>> check malware = *
>>> deny: condition test failed
>>> processing "accept"
>>> accept: condition test succeeded
>>> unspool_mbox(): unlinking

'/var/spool/exim/scan/1DWcsg-0006YG-5K/1DWcsg-0006YG-5K.eml'
LOG: 1DWcsg-0006YG-5K <= gv@??? H=svr-exchange.ad.me.co.uk
(mailgate.me.co.uk) [192.168.1.66] P=smtp S=214
250 OK id=1DWcsg-0006YG-5K

**** SMTP testing: that is not a real message id!

Is -bh the wrong way to test this, or did I mess something up in my routers?

Thank you,
Gary Allen Vollink