Would a hostlist retrieved from a database be treated differently from,
say, one explicitly defined in the configuration file?

 

Example:

 

hostlist foobar_spam = \N^mm-retail-out-[\d-]+\.foobar\.com$\N

 

and

 

hostlist blocked_hosts = ${lookup mysql {select AccessEntry from
ControlAccess where AccessType = 2 and EntityType = 2}}

 

 

 

Both lists contain the same expression:
^mm-retail-out-[\d-]+\.foobar\.com$ yet only the first hostlist seems to
match the incoming host when I run exim -bh <IP>

 

[Note: edited out obnoxious emailer IP in question]


Example output:

>>> checking addresses for mm-retail-out-1105.foobar.com

>>>   xxx.xxx.xxx.xxx OK

>>> host in "\N^mm-retail-out-[\d-]+\.foobar\.com$\N

>>> mm-retail-out-*.foobar.com

>>> ^mm-retail-out-[\d-]+\.foobar\.com$

>>> mm-retail-out-[\d-]+\.foobar\.com"? no (end of list)

>>> host in "+blocked_hosts"? no (end of list)

>>> deny: condition test failed

>>> processing "deny"

 

>>> check hosts = +foobar_spam

>>> host in "^mm-retail-out-[\d-]+\.foobar\.com$"? yes (matched
"^mm-retail-out-[\d-]+\.foobar\.com$")

>>> host in "+foobar_spam"? yes (matched "+foobar_spam")

 

 

Is there a way I can evaluate the data from the database as a list of
regular expressions?  My goal is to write external tools for my team
where expressions are stored in a database and not directly in the
configuration file.

 

 

Kristian Oye, Sr. Operations Developer 

 

-- 
## 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