[Exim] smarthost base on domain question

Page principale
Supprimer ce message
Répondre à ce message
Auteur: ayu20
Date:  
À: exim-users
Sujet: [Exim] smarthost base on domain question
Hi,

I am very new to Exim. I have gotten a working config and Exim is
working almost the way I like it. I having trouble getting my smarthost
router to work the way I indented.

Here's what I am trying to accomplish. I want the smarthost router to
search a text file and determine the smarthost to use to route those
messages. Here's my smarthost router and smarthostroutelist. The IP
address on the list are made up for this example. I am using the real
IP on the server.

smarthost:
driver = manualroute
domains = ! +local_domains
route_list = $domain \
${lookup{$domain}lsearch{CONFDIR/smarthostroutelist}}
ignore_target_hosts = +bogusips
no_verify
host_find_failed = defer
same_domain_copy_routing = yes
transport = remote_smtp

cat smarthostroutelist
yahoo.com: 2.3.4.5
comcast.net: 2.3.4.5
aol.com: 4.5.6.3

Here's what I am getting when I try to test the router.

earth:/etc/exim4# exim -bt ayu20@???
ayu20@???
router = smarthost, transport = remote_smtp
host 2.3.4.5 [2.3.4.5]

earth:/etc/exim4# exim -bt ayu20@???
ayu20@???
router = smarthost, transport = remote_smtp
host 4.5.6.3 [4.5.6.3]

earth:/etc/exim4# exim -bt ayu20@???
ayu20@???
router = smarthost, transport = remote_smtp
host 2.3.4.5 [2.3.4.5]

earth:/etc/exim4# exim -bt ayu20@???
LOG: MAIN
error in smarthost router: no host(s) specified for domain $domain
ayu20@??? cannot be resolved at this time:
error in smarthost router: no host(s) specified for domain $domain
earth:/etc/exim4# exim -bt ayu20@???
LOG: MAIN
error in smarthost router: no host(s) specified for domain $domain
ayu20@??? cannot be resolved at this time:
error in smarthost router: no host(s) specified for domain $domain


How can I get the smarthost router to use the smarthost if it can find
the outgoing email domain in the smarthostroutelist file and use the
localhost for everything else?

I have tried adding an entry like '*: 127.0.0.1' to the
smarthostroutelist file without luck. I really appreciate any help you
can offer.

I know, I can default all my outgoing email to a single smarthost. But
this is more fun. ;-)

I am using Exim 4.30 on a Debian woody server.

Thank you so much.
Ayu.