Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - MSSQL trigger to lower quarantine
  FAQ FAQ  Forum Search   Register Register  Login Login

MSSQL trigger to lower quarantine

 Post Reply Post Reply
TechSquared View Drop Down

Joined: 01 March 2006
Location: United States
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote TechSquared Quote  Post ReplyReply Direct Link To This Post Topic: MSSQL trigger to lower quarantine
    Posted: 01 August 2007 at 7:01am

Here is a trigger I had written to limit the quarantine to people that are actually checking it.  Basically it checks the DB when a line is inserted into the quarantine table and marks it to be deleted if there is not a corresponding user in the logins table.  It has saved me a ton of space for non-existent users, or users that don't check the quarantine.

IF (SELECT COUNT(*) FROM [dbo].[tblLogins], [inserted]
    WHERE [dbo].[tblLogins].[EMail] = [inserted].[EmailTo]) < 1
    UPDATE [dbo].[tblQuarantine]
        SET [Expire] = 1
        WHERE [QuarID] = @@IDENTITY

This is after an insert to the tblquarantine.  It has worked wonders for me.

Tech Squared

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

This page was generated in 0.046 seconds.