On Fri, 18 Feb 2005, Dave Lugo wrote:
>
> USERPREFS=/var/exim/userprefs/${lc:$domain}/${lc:${extract {1}{+} {$local_part} }}
>
> deny domains = +local_domains : +relay_to_domains
> condition = ${if exists{USERPREFS/rhs-blacklist} \
> {yes} {no} }
> dnslists = ${readfile {USERPREFS/rhs-blacklist} {:} }/$sender_address_domain
> message = rejected: $sender_address_domain is listed in $dnslist_domain\n$dnslist_text
I have improved the readability of your snippet by using a macro and more
space.
The problem here is that $sender_address_domain is not added to each entry
in the file. If you have a file containing blacklist.com on a line by
itself then the result of expansion will be blacklits.com:/sender.com
which is a syntax error.
Note that the EOL string in ${readfile can be more than a single
character, so you should try
dnslists = ${readfile {USERPREFS/rhs-blacklist} {/$sender_address_domain:} }
Tony.
--
<fanf@???> <dot@???>
http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}