[rt-users] Redacting details from ticket emails?

Robert Wysocki robert.wysocki at unity.pl
Thu Feb 28 10:16:38 EST 2013


Dnia 2013-02-28, czw o godzinie 18:47 +0800, Craig Ringer pisze:
> On 02/28/2013 06:20 PM, Dominic Hargreaves wrote:
> > And the shredder will need superuser access too. I guess you'd want to
> > be pretty careful about who you let erase data from the database in this
> > way, so depending on your organisation this may or may not be an issue.
> 
> Using the shredder makes sense, at least when total removal rather than
> redaction is required. It'll do until I find time to write an extension
> that replaces the email content with [message ID [x] redacted for client
> security] and possibly record a PGP-encrypted version.
> 
> Thanks for the tip. I hadn't realised the shredder could operate on
> individual transactions not just whole tickets.

We're using a simple (postgresql) query like this:

[SQL]  update attachments set content=(select regexp_replace((select
content from attachments where transactionid=TRANSACTIONID and
contenttype='text/plain'),'PASSWORD','REDACTED','g')) where
transactionid=TRANSACTIONID and contenttype='text/plain';

Also you should check, if there isn't a 'text/html' attachment alongside
'text/plain' in the same transaction and redact it as well if it exists.

Regards,
-- 
Robert Wysocki
administrator systemów linuksowych, dba
Grupa Unity | ul. Przedmiejska 6-10, 54-201 Wrocław
ul. Conrada 55B, 31-357 Kraków | ul. Złota 59, 00-120 Warszawa





More information about the rt-users mailing list