Re: [exim] Searching Regex From A File

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mike Cardwell
Fecha:  
A: exim-users
Asunto: Re: [exim] Searching Regex From A File
d.hill@??? wrote:

> Is there a way to search a file that contains regular expressions of
> sender host names?
>
> I've attempted to search the archives and the wiki and have come up
> with nothing. I have tried the following with no success.
>
> /etc/exim/skip_greet_grey_spam:
> \N^imta\-[0-9]{1,2}\.everyone\.net$\N
>
> acl_check_connect:
>
>    #       Exempt certain hosts from the greeting delay.
>    accept  hosts         = +relay_from_hosts
>    accept  condition     = ${if  
> match{$sender_host_name}{lsearch;/etc/exim/skip_greet_grey_spam}{yes}{no}}

>
>    #       Accept the connection if they have waited for
>    #       the SMTP greeting.
>    accept  delay         = 5s


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#

--
Mike Cardwell - IT Consultant and LAMP developer
Cardwell IT Ltd. (UK Reg'd Company #06920226) http://cardwellit.com/
Technical Blog: https://secure.grepular.com/blog/