It's saying that I have a missing or misplaced { or } somewhere, and I'm not sure where. The line in question is below, and looks perfectly fine to me, even if it does look like LISP.
Code:
interface = ${if isip6{${lookup dnsdb{mxh=${domain:$local_part@$domain}}{$value}fail}}{${lookup dnsdb{AAAA=${domain:$sender_address}}{$value}fail}}{${extract{1}{;}{${lookup dnsdb{>; A=${domain:$sender_address}}{$value}fail}{$value}fail}}}}