I've noticed a lot of spam posted to the forums lately, so I thought I'd share this 'quick fix' (hack ;) that I've used to remove/prevent spammy Contact Us messages (when I don't want to use a CAPTCHA). The basic idea is that a SQL trigger prevents the contact us email from being inserted into the email queue. It does require that you have direct access to our SQL server and a tool like SSMS...
CREATE TABLE [dbo].[SpamPhrase](
[Id] [int] IDENTITY(1,1) NOT NULL,
Phrase [nvarchar](50) NOT NULL,
PRIMARY KEY CLUSTERED
(
[Id] ASC
))
GO
--do these as needed - e.g.
insert into [SpamPhrase](Phrase) values ('generic cialis')
CREATE TRIGGER QueuedEmailSpamBlocker
ON [dbo].QueuedEmail
FOR INSERT
AS
BEGIN
SET NOCOUNT ON
if exists ( select 1
from inserted i
join SpamPhrase s on i.Body like '%'+s.Phrase+'%'
where i.Subject like '%Contact us%'
)
rollback transaction
END
GO
(Note, that this may throw an Exception that put up an error message in the browser, but it's just a bot doing the spam, so they won't mind ;)