| 1 | = redacting messages in mailman archives = |
| 2 | |
| 3 | https://lists.mayfirst.org/ runs mailman. Sometimes information gets posted to a mailman list that should not be public. Once private information is posted, it has already been leaked. But people may want to redact information from our publicly-accessible archives or from follow-on list digest mailings, etc. We should do this sparingly, and only with good reason (e.g. someone posting someone else's private information to a publicly archived list). |
| 4 | |
| 5 | This page contains information on how an MF/PL administrator can redact messages from a mailman archive to avoid further exposure. It does not solve the problem that the data has already leaked. |
| 6 | |
| 7 | Connect to leslie.mayfirst.org and switch to the mailman user: |
| 8 | |
| 9 | {{{ |
| 10 | ssh -t root@leslie.mayfirst.org su - list |
| 11 | }}} |
| 12 | |
| 13 | FIXME: can we lock these files so that mailman doesn't clobber them while we edit? This could be risky on a high-traffic list. |
| 14 | |
| 15 | Assuming that the message has just recently been sent, edit both the pending digest mail and the current archive: |
| 16 | |
| 17 | {{{ |
| 18 | cd /var/lib/mailman |
| 19 | $EDITOR archives/private/$listname.mbox/$listname.mbox lists/$listname/digest.mbox |
| 20 | }}} |
| 21 | |
| 22 | Things to watch out for when editing these files: |
| 23 | * avoid removal of entire messages, since that will screw up the public-facing URLs. You may just replace the message body with a body that says "message redacted", for example. |
| 24 | * If you are doing significant surgery, please pay attention to the Content-Type headers, etc, so that the message ends up cleanly formatted |
| 25 | * Avoid creating new lines that start with the word `From` (with any capitalization), since this is how mbox indicates the start of a new e-mail message. |
| 26 | |
| 27 | Once this is done (still as `list@leslie`) ask mailman to re-build all the archives for that list: |
| 28 | |
| 29 | {{{ |
| 30 | ./bin/arch $listname |
| 31 | }}} |
| 32 | |
| 33 | (anyone know of a way to do this in a more targeted fashion? for long lists or high-traffic lists, this step could take ages!) |
| 34 | |
| 35 | You may also be interested in [http://wiki.list.org/pages/viewpage.action?pageId=4030681 the upstream documentation about removing/redacting messages in mailman] for more detail. |