In IRC a user (running 4.75 + patches for 4.76) was asking if the
following should work:
senders = *@+some_domain_list
Is there anything in the documentation (I couldn't find it) that says
that this expansion should or should not be expected to expand? I
added the following to my data acl on my 4.76 system:
acl_check_content:
warn senders = *@+yahoo_domains
message = Yeah, found it
where yahoo_domains is defined as:
domainlist yahoo_domains = yahoo.com.hk : yahoo.com.tw
It matches in the following test where the envelope sender is
"tlyons@???"
>>> using ACL "acl_check_content"
>>> processing "warn"
>>> check senders = *@+yahoo_domains
>>> yahoo.com.tw in "yahoo.com.hk : yahoo.com.tw"? yes (matched "yahoo.com.tw")
>>> yahoo.com.tw in "+yahoo_domains"? yes (matched "+yahoo_domains")
>>> tlyons@??? in "*@+yahoo_domains"? yes (matched "*@+yahoo_domains")
>>> warn: condition test succeeded
Repeated the test, and it properly did not match where sender is
"tlyons@???"
>>> using ACL "acl_check_content"
>>> processing "warn"
>>> check senders = *@+yahoo_domains
>>> gmail.com in "yahoo.com.hk : yahoo.com.tw"? no (end of list)
>>> gmail.com in "+yahoo_domains"? no (end of list)
>>> tlyons@??? in "*@+yahoo_domains"? no (end of list)
>>> warn: condition test failed
He then noted that "senders = *@+domainlist : *@foo.com" doesn't seem
to do that same expansion (later figured out it was simply he was
missing a long wrapped line :-). I added it (and also reversed the
order to make sure that it would process each part of the list) then I
tested and it did work:
>>> using ACL "acl_check_content"
>>> processing "warn"
>>> check senders = *@foo.com : *@+yahoo_domains
>>> yahoo.com.tw in "foo.com"? no (end of list)
>>> yahoo.com.tw in "yahoo.com.hk : yahoo.com.tw"? yes (matched "yahoo.com.tw")
>>> yahoo.com.tw in "+yahoo_domains"? yes (matched "+yahoo_domains")
>>> tlyons@??? in "*@foo.com : *@+yahoo_domains"? yes (matched "*@+yahoo_domains")
>>> warn: condition test succeeded
My basic questions are:
1. Is it expected that this expansion should occur (expand a
domainlist with that one local_part to make a new list) ?
2. Is it documented anywhere? If no, should it be?
3. Or is this unexpected? I have to admin that it did surprise me.
...Todd
--
If Americans could eliminate sugary beverages, potatoes, white bread,
pasta, white rice and sugary snacks, we would wipe out almost all the
problems we have with weight and diabetes and other metabolic
diseases. -- Dr. Walter Willett, Harvard School of Public Health