If you want to just outright block links, at least from untrusted users, this is possible via the spam phrases system. Easiest option would be to put this in it:
This will apply to other places too -- signatures, profile posts, conversations, etc.
The spam phrases system only checks people for their first few messages, though you can adjust that. You can also explicitly exempt certain groups from the checks.