RT-MUNG...CHMENTS(1)

πŸ“¦
version 5.0.10 Β· 4 versions
, in fedora 43

✨ rt-munge-attachments β€” the manual page but make it cute ✨

okay bestie, so this is rt-munge-attachments, from the User Contributed Perl Documentation section (manual page RT-MUNG...CHMENTS(1), iykyk). pull up a chair, we're doing text surgery on RT πŸ’…


🌸 NAME 🌸

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


✨ SYNOPSIS ✨

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

that's it. that's the whole vibe. one command, one glow-up for your personal data 🌈


πŸ’– DESCRIPTION πŸ’–

ok so first thing, bestie, you need to know what an "attachment" even is in RT: attachments contain all correspondence on tickets. not just the file-based ones you're picturing. everything. the receipts, the emails, the whole group chat 🧚

normally, once an attachment is created, RT does not let you modify it. that's the rule. but this script is the exception β€” it gives you a way to change or remove personalized data, like email addresses, that might be chillin' in the headers or bodies of RT attachment records. and why would you want that? because it lets admins comply with GDPR ✨ while still keeping the ticket histories with all the remaining non-personal info intact. best of both worlds, no cap.

when this script modifies content, a transaction is recorded β€” so there's a record that something got changed on the ticket. but here's the tea: the details of the change are not recorded, because those values would probably contain the exact personal information the script was run to remove. so it's a record that says "something happened" and nothing more πŸ™ˆ lowkey iconic of it.

⚠️ and now the serious part, bestie: if modifying ticket history violates your audit policies, admins should not use this script. periodt. no amount of cute vibes changes that one.

πŸ’… OPTIONS πŸ’…

  • --search=SEARCH β€” hand it a string and it'll search the header and content columns in the attachments table πŸ”. if it finds a match, that content gets removed β€” unless you also gave it a replacement, in which case, replacement time ✨
  • --replace=REPLACEMENT β€” give it a string to swap in for whatever --search matched. that's the glow-up right there πŸ¦‹
  • --tickets=1,2,3 β€” limits attachments to the tickets you list. and listen, this one matters: if you don't specify tickets or transactions, RT will pre-filter attachments by the search string using SQL β€” which can bypass attachments whose contents are encoded (like base64, sneaky little thing 😭). so use this option to prevent that pre-filter behavior. fr fr.
  • --transactions=123,456,7 β€” limits attachments to the transactions you list. if you specify this, the default pre-filtering gets prevented βœ…. and good news, it can work alongside the --tickets flag, they're not jealous πŸ’œ
  • --skip-headers β€” by default, headers get munged too. to disable munging of headers, set the --skip-headers flag. hands off the headers, thank you very much πŸ™…β™€οΈ
  • --skip-content β€” by default, transaction content gets munged. to disable munging of content, set the --skip-content flag. same energy, different column πŸŽ€

🌟 SEE ALSO 🌟

there's genuinely nothing else to see here, bestie β€” the options above are the whole menu. go forth and munge responsibly πŸ’–


okay that's the whole page!! no notes, she ate πŸ‘‘

signing off from perl v5.42.3, dated 2026-07-20 β€” mwah πŸ’‹ πŸ’…

πŸ“¦ where this page comes from