Re: [Exim] how to accept a regular expression on the entire …

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Andreas Metzler
Dátum:  
Címzett: exim-users
Új témák: [Exim] how to do an logical OR in acl's? How to allow recipients without domain? ("5.1.2. Bad Recipient format --- no domain specified" Mozilla Messenger error message)
Tárgy: Re: [Exim] how to accept a regular expression on the entire recipient address and not just "local_parts"
On Thu, Sep 18, 2003 at 10:37:12AM +0200, Ralf Hauser wrote:
> So far, my exim.conf had authenticated all senders and applied the default
> rules otherwise.
> acl_check_rcpt:
>   accept  hosts = :
>   deny    local_parts   = ^.*[@%!/|] : ^\\.
>   accept  authenticated = *
>   deny    message       = relay not permitted


> now I want to also allow address with a given prefix (e.g. "rrr") and then
> 3-10 hexadecimal character and no domain part. Unfortunately, the below
> fails with <<LOG: PANIC DIE
> Exim configuration error in line 45:
> error in ACL: unknown ACL condition/modifier in "accept...>>


> acl_check_rcpt:
>   accept  hosts = :
>   accept recipient = ^rrr[a-zA-Z0-6]{3,10}$
>   endpass
>   deny    local_parts   = ^.*[@%!/|] : ^\\.
>   accept  authenticated = *
>   deny    message       = relay not permitted


"recipient" is no valid ACL conditions (37.12 in spec.), you might be
have wanted to use "recipients", but this wouldn't have had the
intended effect, there are some other errors:
* afaik address lists are expanded, i.e you'd have to use
  accept recipients = \N^rrr[a-zA-Z0-6]{3,10}$\N
* As the regular expression is matched against the complete address,
  and not just the local part, it will never match (it does not match
  an @)
                 cu andreas