Re: [exim] Searching Regex From A File

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Marc Perkel
Datum:  
To: exim-users
Betreff: Re: [exim] Searching Regex From A File


On 12/9/2009 7:31 AM, Mike Cardwell wrote:
> Mike Cardwell wrote:
>
>
>> You want to use wildlsearch. Example:
>>
>> root@haven:/etc/exim4# cat test
>> \N^imta\-[0-9]{1,2}\.everyone\.net$\N Everyone.Net
>> root@haven:/etc/exim4# exim4 -be
>> '${lookup{imta-1.everyone.net}wildlsearch{/etc/exim4/test}{$value}{}}'
>> Everyone.Net
>> root@haven:/etc/exim4# exim4 -be
>> '${lookup{imta-X.everyone.net}wildlsearch{/etc/exim4/test}{$value}{}}'
>>
>> root@haven:/etc/exim4#
>>
> You can probably just leave the skip_greet_grey_spam file as it is, and
> do this:
>
> condition =
> ${lookup{$sender_host_name}wildlsearch{/etc/exim/skip_greet_grey_spam}{yes}{no}}
>
>


Here's an example of what I did:

condition = ${if match
{$acl_c_from_namepart}{${sg{${sg{${sg{${readfile{/etc/exim/control/from-regex.txt}{|}}}{\\|+}{|}}}{#.*?\\|}{}}}{\\|\$}{}}}{yes}{no}}

or

regex =
${sg{${sg{${sg{${readfile{/etc/exim/control/spamstorm.txt}{:}}}{\\:+}{:}}}{#.*?\\:}{}}}{\\:\$}{}}

Hoping I understand the question correctly.