Re: [exim] Condition problem

Top Page
Delete this message
Reply to this message
Author: Christian Hertel
Date:  
To: Magnus Holmgren, exim-users
Subject: Re: [exim] Condition problem
Hello Magnus,

> /etc/exim4/whitelisted-recipients has no data, just keys, so
> the lookup always
> returns the empty string. Alternately, append anything to each line
> of /etc/exim4/whitelisted-recipients. That's a bit more
> efficient since the
> whole file won't have to be read when there is a match.


Aah, you're right. I misunderstood the way lsearch is working. Now I changed
my router to:

--- snip ---

##
## mailfilter incoming
##
mailfilter_incoming_director:
  driver = manualroute
  domains = +forward_domains
  condition = "${if and { \
                          { !eq {$received_protocol}{mailfilter} } \
                          { eq
{no}{${lookup{$local_part@$domain}lsearch{/etc/exim4/whitelisted-recipients}
{yes}{no}}} } \
                        } {yes}{no}}"
  transport = mailfilter_incoming
  route_list = "* localhost byname"
  verify = false


--- snap ---

Now it exactly does what it should do.


Thank you for your help!


Cheers,

--
Christian Hertel
Netzwerk-Sicherheit/Netzwerk-Applikationen

infoServe GmbH
Nell-Breuning-Allee 6
D-66115 Saarbruecken

T: (0681) 8 80 08 - 59
F: (0681) 8 80 08 - 33
www.infos.de
mailto: c.hertel@???

Handelsregister: Amtsgericht Saarbrücken, HRB 11001
Erfüllungsort: Saarbrücken
Geschäftsführer: Dr. Werner Stein
Ust-IdNr.: DE168970599