summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/Scrubber.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Much revision based on good feedback from mailman-developers.bwarsaw2001-10-261-42/+111
| | | | | | | | | | | | | | | | | | | | | | | | | Specifically, process(): Instead of a blanket discard of text/html parts, what we do depends on the value for ARCHIVE_HTML_SANITIZER. Also, the "scrubbed" message now includes the value of get_filename() if available. save_attachment(): Several refinements including: all of a message's attachments are stored in a subdirectory off archives/private/mylist/attachments. This subdir is calculated based on the SHA1 hash of the Message-ID: We store the attachment in a file based on the name of the get_filename() value, sanitize for nasty characters, absolute paths, etc. The filename is uniquified within the message's attachments subdir. This function also knows about text/html and performs filtering when ARCHIVE_HTML_SANITIZER is a program string. Note that currently, we assume that this program will filter html into plain text, so we change the attachment's suffix to .txt accordingly. We don't need the attachments.pck file anymore.
* process(), save_attachment(): Set the umask before creating thebwarsaw2001-10-261-6/+6
| | | | attachments.pck file, so it gets the right permission too.
* process(): Fix the processing of text/html parts w.r.t. discarding thebwarsaw2001-10-261-3/+8
| | | | | | | outers and scrubbing out the inner subparts. save_attachment(): Set the umask to 002 so that the attachments don't get saved o+w.
* Some refinements in the outputted appearance of the archive file.bwarsaw2001-10-251-6/+56
| | | | | | | Subpart headers are suppressed, and the inter-part boundary string is kludged to provide more useful information. Also, text/html parts are now completely suppressed.
* A new module that will clean messages before they're committed tobwarsaw2001-10-241-0/+109
Pipermail. As this is a standard handler-style module (i.e. it has a typical process() function), it could be used in a pipeline to scrub messages headed to the list (i.e. a de-mimer). Current drawback is that it's fairly hardcoded. Graft on a U/I (easier said than done), and it could work.