Re: [exim] stupid ACL named list question using match

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Ian Eiloart
Dátum:  
Címzett: exim-users, Chad Leigh
Tárgy: Re: [exim] stupid ACL named list question using match


--On 22 December 2006 09:52:43 +0000 Philip Hazel <ph10@???>
wrote:

> On Fri, 22 Dec 2006, Chad Leigh -- Shire.Net LLC wrote:
>
>> check_helo:
>>    accept hosts = 166.70.252.0/24 : webmail.shire.net : lists.shire.net
>>    deny message  = Go away, impostor!
>>          condition = ${if match{${lc:$sender_helo_name}}{shire.net}
>> {true}{false}}
>>    accept hosts = *

>>
>>
>> I got this from some samples that I munged together.
>
> You have overlooked the fact that that will also match shirelnet,
> shireOnet, etc., and also not necessarily at the start or end of the
> name. So something like wiltshiresnet.com would match.


Chad,

To accurately match the dot, escape it with a backslash: lists\.shire\.net

To match the end of string, do this: lists\.shire\.net$

Since it's your domain, that should do. It will match subdomains, though.


>> If I do
>>
>>    domainlist    local domains = shire.net : objectwerks.com

>>
>> for example
>> and do
>>
>>    deny message  = Go away, impostor!
>>          condition = ${if match{${lc:$sender_helo_name}}
>> {+local_domains}{true}{false}}

>>
>> I get an error
>
> Well yes, because +local_domains is not a valid regular expression.
> You need match_domain, not match, to match a list of domains. There's an
> example in the manual.
>
> --
> Philip Hazel            University of Cambridge Computing Service
> Get the Exim 4 book:    http://www.uit.co.uk/exim-book




--
Ian Eiloart
IT Services, University of Sussex