[exim] Router-question

Etusivu
Poista viesti
Vastaa
Lähettäjä: Johann Spies
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] Router-question
I am busy with a new setup where I have a list of valid user addresses
in a db-file (created from a flat file) and all the email to those
users have to go to an Exchange server.

Unfortunately it is not as easy as using a domain restriction in the
router because those addresses are not all from one domain.

I cannot use the $recipients in the router but I can use
"$address_data" there. I am not sure how to use it in this case.

In my test setup in acl_check_rcpt I have:

require recipients = message Unknown recipient
             dbm;/tmp/ad.db



I am not sure how to handle the lookup and condition the manual
router. I have tried both conditions showed here, but they are wrong.
I think I do not really understand the lookups. The file
/tmp/ad_email_sort.txt is a the flatfile from which ad.db was built
using /usr/sbin/exim_dbmbuild.

active_directory_user:
driver = manualroute
domains = mrc.ac.za
#condition = ${lookup{$local_part@$domain}dbm;/tmp/ad.db}{yes}{no}
condition = ${lookup{$local_part@$domain}lsearch{/tmp/ad_email_sort.txt}}
transport = remote_smtp
route_list = * 172.18.5.18

When with this configuration I run 'exim -d -bt craig.douman@???'
I get
" internal_search_find: file="/tmp/ad_email_sort.txt"
type=lsearch key="craig.douman@???"
file lookup required for craig.douman@???
in /tmp/ad_email_sort.txt
lookup yielded:
"

And when I run an exim -bh to test the acl's I see:

>>> check recipients = dbm;/tmp/ad.db
>>> craig.douman@??? in "dbm;/tmp/ad.db"? yes (matched
>>> "dbm;/tmp/ad.db")
>>> require: condition test succeeded


Any help would be appreciated.

Regards
Johann

-- 
J.H. Spies - Tel. 021-982 2694 / 082 782 0336 / 021-808 4036(w)  
             Posbus 4668, Tygervallei 7536
     Webblad:  http://www.alterit.co.za


     "For by grace are ye saved through faith; and that not 
      of yourselves: it is the gift of God: Not of works, 
      lest any man should boast."   Ephesians 2:8,9