Just sharing a little code that some might find useful. This is a way to 
store a list of regular expressions in a file to select a host. What 
this does it read a text file and build a regex that looks like:

^.*\.(line1|line2|line3)$

This can be modified and used for anything where you are testing 
something against a list.

warn    message = X-Big-Host: $sender_host_name
    condition = ${if match {$sender_host_name}\
{^.*\.\x28${sg{${sg{${sg{${readfile{/etc/exim/acllists/bighosts.txt}{|}}}{\\|+}{|}}}{#.*?\\|}{}}}{\\|\$}{}}\x29\$}{yes}{no}}


List looks like this:

locos\.com
aol\.com
yahoo\..*


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

Reply via email to