I see two issues:
1) You're calling spam_assassin_check() twice. Once is enough.
2) You may want to indent so your code looks cleaner and is easier to follow.
You seem to redirect all mail to your "<spam@localhost>" mailbox right at the spam threshold. I find it better to have a "grey" middle-ground where it's BCC'ed to the spam mailbox but also delivered to the original recipients when the score is right at the threshold. Your choice.
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.