rt-munge-attachments(8)

πŸ“¦
version 4.4.7 Β· 5 versions
, in ubuntu noble

✨ rt-munge-attachments ✨

okay bestie, so this is rt-munge-attachments from the Request Tracker Reference section of the manual (section 8, system admin tools, iykyk) β€” and it's literally the glow-up tool for scrubbing personal info out of your RT attachments πŸ’…


🌸 NAME 🌸

rt-munge-attachments β€” remove or replace strings in attachment records


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first thing's first, bestie: in RT, "attachments" contain all correspondence on tickets, not just the file-based attachments you're picturing. like, everything. the whole vibe. 😭

normally RT does not modify attachments once they're created β€” they're frozen in time, main character behavior, iconic. but this script gives you a way to change or remove personalized data like email addresses that might be chilling in the headers or bodies of RT attachment records. so it's the designated exception, the one who gets to touch the archive. πŸ’–

and why would you want that? so admins can comply with GDPR regulations while still keeping ticket histories with the remaining non-personal info. slay. you get to eat your cake and keep the ticket too. πŸ“

when this script modifies content, a transaction is recorded, so there's a record that something was changed on the ticket. but β€” and this is the important part β€” the details of the change are not recorded</>, because the values would likely contain the personal information that the script was run to remove in the first place. makes sense, no cap. πŸ™ˆ

⚠️ real talk though: if modifying ticket history violates your audit policies, admins should not use this script. like, at all. this is not a "maybe just this once" situation. πŸ’€

✨ OPTIONS ✨

  • --search=SEARCH β€” hand it a string and it will search the header and content columns in the attachments table. if a match is found, the content will be removed β€” unless you provide a replacement. 🫢
  • --replace=REPLACEMENT β€” hand it a string and that's what replaces the value matched by the search. the swap, the trade, the substitution. ✨
  • --tickets=1,2,3 β€” limits attachments to the specified tickets. okay so listen: if tickets are not specified, RT will pre-filter attachments by the search string using SQL, which might bypass attachments whose contents are encoded (like base64). 😭 use this option to prevent the pre-filter behavior. literally the fix. πŸ’…

and that's the whole page, bestie β€” go forth and munge responsibly πŸŒˆπŸ‘‘

this page is perl v5.38.2, dated 2023-10-29, and it lives at rt-munge-attachments(8) in the Request Tracker Reference β€” mwah, bye! πŸ’–πŸŽ€πŸ§š

πŸ“¦ where this page comes from