On 2008-04-17 at 10:37 +0200, Patryk R. wrote:
> Awesome, thanks for this reply. Just one final question, if I got this right, 
> in contrary 
> to ACLs there's no "invisible deny all" at the end, so if I wanted one 
> address allowed and 
> all denied, does this make sense:
> 
> senders = [EMAIL PROTECTED] : !*

Note that "address.com" is a domain registered to "WhitePages.com, Inc";
the gTLD registries reserve "example" for examples.

The !* is not needed.  Without it, the last item is a positive
constraint, therefore the default is that an item is not present.

10.2 Negated items in lists

> Also, will the !* match the blank sender address as well? (If yes, then I 
> could get rid of 
> that extra condition.)

10.19 Address lists
describes matching the empty sender.

The best way to find out if !* matches is to try it.  Exim has rather
good facilities for an administrator to ask it questions about how
something would be interpreted.

----------------------------8< cut here >8------------------------------
$ exim -f '<>' -be
> $sender_address

> ${if [EMAIL PROTECTED]:!*} {found}{nope}}
found
> ${if [EMAIL PROTECTED] {found}{nope}}
nope
> <Ctrl-D>
$ exim -f '[EMAIL PROTECTED]' -be
> $sender_address
[EMAIL PROTECTED]
> ${if [EMAIL PROTECTED]:!*} {found}{nope}}
nope
> ${if [EMAIL PROTECTED] {found}{nope}}
nope
----------------------------8< cut here >8------------------------------

So the empty address doesn't match the * in !*, since otherwise it would
be a "nope"; instead, because the last item in the list is negative,
something not matching anything in the list yields a match (section
10.2, referenced above, explains this).

-Phil

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to