RT 5.0.2 Documentation

rt-munge-attachments

Go to latest version →

rt-munge-attachments

rt-munge-attachments - Remove or replace strings in attachment records

SYNOPSIS

    rt-munge-attachments --search="user1@example.com" --replace="removed-user@example.com"

DESCRIPTION

In RT, "attachments" contain all correspondence on tickets, not just file-based attachments. Although attachments are normally not modified by RT once created, this script provides a way to change or remove personalized data like email addresses that might be contained in the headers or bodies of RT attachment records. This allows admins to comply with GDPR regulations, but retain ticket histories with remaining non-personal information.

A transaction is recorded when this script modifies content so there is a record that something was changed on the ticket. Details of the change are not recorded since the values would likely contain personal information which the script was run to remove.

If modifying ticket history violates audit policies, admins should not use this script.

OPTIONS

Provide a string to search the header and content columns in the attachments table. If a match is found the content will be removed unless a replacement is provided.

--replace=REPLACEMENT

Provide a string to replace the value matched by the search.

--tickets=1,2,3

Limit attachments to the specified tickets. Note that if tickets or transactions are not specified, RT will pre-filter attachments by the search string use SQL, which might bypass attachments of which contents are encoded(like base64). Use this option to prevent the pre-filter behavior.

--transactions=123,456,7

Limit attachments to the specified transactions. If specified the default pre-filtering will be prevented. This option can work alongside the --tickets flag.

--skip-headers

By default headers are also munged, to disable munging of headers set the --skip-headers flag.

--skip-content

By default transaction content is munged, to disable munging of content set the --skip-content flag.

← Back to index