[exim] hostlist access control question

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Kris Oye
Date:  
À: exim-users
Sujet: [exim] hostlist access control question
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