[rt-users] Shredding Attachments by Queue/Date Range

G.Booth G.Booth at lboro.ac.uk
Fri Jul 16 03:31:22 EDT 2010

Hi Scott

The attached script may get you started. It shreds all tickets in a named 
queue "SPAM-Shredder" that are older than 7 days (it takes todays date via 
POSIX and compares it to the LastUpdated field for the ticket and gets the 
queue via RT::Ticket->LimitQueue). You should be able to modify it to work 
with attachments as the shredder API seems to have the necessary bits: e.g 
 RT::Shredder::Plugin::Attachments and RT::Shredder::Attachments.

It runs from /opt/rt3/local/bin

Hope it helps

-------------- next part --------------
A non-text attachment was scrubbed...
Name: shred_tickets.rtf
Type: application/octet-stream
Size: 1624 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100716/f3a421d0/attachment.obj>

More information about the RT-Users mailing list