If the referring page is not the one you specified in the CP options, normally
http://www.domain.tld/sendmessage.php, an automated script with the POST / GET commands will receive an essentially blank page, and the mail is not sent.
This is useful only to sites, like mine, where image verification is not appliable.
PHP Code:
$MyMessageURL = $vbulletin->options['bburl'] . '/' . $vbulletin->options['contactuslink'];
if($_SERVER['HTTP_REFERER'] != $MyMessageURL)
{
die('Spam filter: Please send your message through the appropriate message form.');
}
Sooner or later the spam bots will be updated to send also the referrer header, but until then this one works pretty well ...
When this will happen, an additional test may be to add a host IP comparison.