[rt-users] RT2 ticket deletion

Feargal Reilly feargal at thecia.ie
Tue Sep 2 10:23:21 EDT 2003


On Tue, 2 Sep 2003 10:06:32 -0400
Binand Sethumadhavan <binand at gmx.net> wrote:

> On Tue, Sep 02, 2003 at 08:48:51AM -0500, Mitchell Henderson wrote:
> > Hi,
> > 	Over the weekend we got around ~16000 bounced messages.  They are all the
> > 	same email, so would anyone have a script to do this large of a batch
> > 	update or would a simple mysql command line update to the Tickets.Status
> > 	var work?
> 
> With RT2, you could do:
> 
> /path/to/rt/bin/rt2 --id=1-16000 --status=dead
> 
> to kill all tickets numbered from 1 to 16000.

If any valid tickets came in the middle however, this would kill them too. Assuming you don't have scrips you want triggered by the status change (with 16,000 I doubt you do) a simple sql query would do it:
UPDATE tickets SET status='dead' WHERE creator=12345;
12345 is the id in the user's table - 
SELECT id FROM users WHERE emailaddress='spammer at example.com';

-fr.

-- 
Feargal Reilly,
Systems Administrator,
The FBI.



More information about the rt-users mailing list