Re: [exim] Exim system filter lookup search

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Brent Jones
Datum:  
To: Odhiambo Washington
CC: exim-users
Betreff: Re: [exim] Exim system filter lookup search

Quoting Odhiambo Washington <odhiambo@???>:

> On 10/23/07, Brent Jones <brent@???> wrote:
>> Exim users,
>> I'm trying to write a system filter that saves all e-mail that comes
>> from certain domains. The list of domains is rather large, and I want
>> to do a lookup to a file from within the system filter file.
>> However, when I look up the file, it never matches a record, and does
>> not save a copy to another destination.
>>
>> Example:
>>
>> if $sender_address_domain contains
>> ${lookup{$sender_address_domain}lsearch*{/etc/exim/domains}}
>> then
>> save /usr/exim/mail/
>> endif
>>
>> The /etc/exim/domains file contains various domain in a list. I know
>> lsearch is not supposed to be used as a list, but rather a key lookup.
>> But I am at a loss to read in a list any other method.
>>
>> Does anyone have any thoughts on that system filter rule?
>
> if ("${lookup {$sender_address_domain}
> partial-lsearch*@{/etc/exim/domains} {1}}" is 1) then
> ....
>
> --
> Best regards,
> Odhiambo WASHINGTON,
> Nairobi,KE
> +254733744121/+254722743223
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  _ _
> "Oh My God! They killed init! You Bastards!"
>                         --from a /. post

>



That worked perfectly, I hadn't read about the partial-lsearch
function, and it seems to be doing the job perfectly.
Thanks!

Regards


Brent Jones
brent [at] servuhome [dot] net

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.