Flagging forum content

Hi, Is there a way can automatically flag the forum post/reply content spam if the content has external URLs?

Thanks