This is the section in spam-daemon.tcl that's giving the error:
if {[string match $template_p "t"]} {
if {[catch {
set message_body [subst $message_body_template]
set title [subst $title]
} errmsg]} {
ns_log Error "Tcl evaluator error in subst call for spam_id $spam_id: $errmsg
Aborting the sending of this spam."
break
}
} else {
set message_body $message_body_template
}
So it looks like there is still a problem with your template. Have you changed your template? Try adding a ns_log message in spam-daemon.tcl to output $message_body_template. The template probably references ad_sec_user_id or calls a routine that references it. It's probably called from inside of im_status_report somewhere.