Re: [exim] Router problem

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Schramm, Dominik
日付:  
To: exim-users
題目: Re: [exim] Router problem
Hi Hans,

Hans Klose wrote on Tuesday, July 22, 2008 12:55 PM:

> The first router the mail passes is a query I wrote in perl.
> He looks if the User is in our AD and in a MYSQL DB and if
> so it will be forwarded to our internal Mailserver.


We have the same setup here, however, I extract all the valid
AD addresses into a database (sqlite) twice a day and check
against this database in my routers. That way the availability
of the LDAP servers is irrelevant for the mail server.

> I thought if exim can not reach 217.196.145.212 it will try
> it again later and later and so on
> and send the mail back after 4 Days. Or if the LDAP server is
> reachable again exim
> send the mail to the internal server, as he should.


What does the sub/script ldap_check_rcpt return when the LDAP
server is down? If it's the same as when the LDAP server is
reachable, then exim should use the ordinary retry mechanism.
If it's not the same, then exim cannot know that the router
ldap_down should nevertheless be used (and the message deferred)
and control should not pass on to the next router. In the latter
case the condition would have to be extended to cover LDAP
outages.

Example: You could check the availability of the LDAP server in
a redirect router before the actual router. Something like this
(this is not guaranteed to be syntactically valid):

ldap_down:
   debug_print = "R: LDAP server is down"
   driver      = redirect
   data        = :defer:
   condition   = ${if and { {eq{${perl{ldap_check_ldap_reachable}}}{LDAP is unreachable}} \
                            {eq{${perl{ldap_check_rcpt}{router}}}{true}} }}


ldap_lookup:
   debug_print = "R: LDAP Lookup Router"
   driver      = manualroute
   condition   = ${if eq{${perl{ldap_check_rcpt}{router}}}{true}{yes}{no}}
   self        = ${if eq{${perl{ldap_check_ldap_reachable}}}{LDAP is unreachable} {defer}{pass}}
   route_list = * 192.168.0.10
   transport   = remote_smtp


Regards,
Dominik