I can't seem to get this to work:
spam_tag_router:
check_local_user
# - bypass bounce in system filter if spam flag is set to tag
condition = ${if and{eq{tag} {${lookup mysql {SELECT spam FROM passwd
WHERE id='${local_part}@${domain}'}}} {!d
ef:h_X-Spam-Flag:}} {yes}{no}}
driver = accept
transport = spamtag
The nested conditions in my if statement keep giving me an error.
2002-12-21 20:54:21 H7I8AJ-0002BR-00 <jpkelly@???>: spamcheck
transport output: 2002-12-21 20:54:21 H7I8AJ-0002BV-00 failed to expand
condition "${if and{eq{tag} {${lookup mysql {SELECT spam FROM passwd
WHERE id='${local_part}@${domain}'}}} {!def:h_X-Spam-Flag:}}
{yes}{no}}" for spam_tag_router router: subcondition in {} expected
inside "and{...}" condition
What is the syntax to properly nest conditions?