* on the Wed, Feb 21, 2007 at 03:06:03PM +0000, Mike Cardwell wrote:
> | [EMAIL PROTECTED]:~/foo$ echo -ne "Username: yes\nUsername2: yes" >
> | lookup_file.txt
> | [EMAIL PROTECTED]:~/foo$ /usr/sbin/exim4 -be
> | > ${lookup{Username}lsearch{lookup_file.txt}}
> | yes
> | > ${lookup{UsernameFoo}lsearch{lookup_file.txt}}
> |
> | >
>
> This shows that your lookup method returns either "yes" or "" when
> expanded. This means that the only address that would match is
> "[EMAIL PROTECTED]" and that would only match if the username "yes" was
> in the "domain-redirect" file.
>
> The expansion should return the local part it's self. Try replacing
> with:
>
> ${if eq{${lookup{$local_part}lsearch{lookup_file.txt}}}{yes}{$local_part}{}}
Ok. I just saw the other two answers. Do it their way, my suggestion's
crap. I'm very familiar with mysql and dnsdb lookups, but I've never
really done much with file lookups other than copy and paste other
peoples examples.
Mike
--
## List details at http://www.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/