Re: Deleting one attachment

Matt Zagrabelny <[email protected]>
Newsgroups gmane.comp.bug-tracking.request-tracker.user
Message-ID <CAOLfK3VRFSiJDPpg2om3A-2sUmVmTPYkT6hhfrYi0h-aW=RCKQ@mail.gmail.com>
On Wed, Oct 19, 2016 at 11:28 AM, Ram <[email protected]> wrote:
> Hi all,
> A user at work added an attachment that violates corporate policy to a
> ticket; the ticket itself is valid and must be kept. I need to delete the
> attachment. A quick look at the rt-shredder tool does not make it apparent
> to me how to do this with rt-shredder. I can readily do it editing the db in
> mysql but I'd rather use rt-shredder if it will do the job.
> any help?

Running 4.2.12 here...

# /opt/rt4/sbin/rt-shredder --plugin list
Plugins list:
    Objects
    SQLDump
    Summary
    Tickets
    Attachments
    Users

So it looks like it can shred attachments.

/opt/rt4/sbin/rt-shredder --plugin help-Attachments
USAGE
  masks
    If any argument is marked with keyword `mask' then it means that this
    argument support two special characters:

    1) `*' matches any non empty sequence of the characters. For example
    `*@example.com' will match any email address in `example.com' domain.

    2) `?' matches exactly one character. For example `????' will match any
    string four characters long.

NAME
    RT::Shredder::Plugin::Attachments - search plugin for wiping
    attachments.

ARGUMENTS
  files_only - boolean value
    Search only file attachments.

  file - mask
    Search files with specific file name only.

    Example: '*.xl?' or '*.gif'

  longer - attachment content size
    Search attachments which content is longer than specified. You can use
    trailing 'K' or 'M' character to specify size in kilobytes or megabytes.

Then perhaps something like:

/opt/rt4/sbin/rt-shredder --plugin
Attachments=files_only,1;file,some_secret_document.pdf

I didn't try the above and I would _for sure_ try it on a test system
first - at least a test ticket with a test attachment.

-m
---------
RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.