Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77540
| Date | 2014-09-04 05:45 -0500 |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Subject | Re: Best way to filter parts of a email.message.Message |
| References | <20140903205958.119351c8@bigbox.christie.dr> <20140904035240.GA75238@cskk.homeip.net> <CAPTjJmqUU8BTZeGaUnGLqSt_QbW0pN70=pDRGL4vOAYj+2VPhA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13763.1409827608.18130.python-list@python.org> (permalink) |
On 2014-09-04 14:08, Chris Angelico wrote: > On Thu, Sep 4, 2014 at 1:52 PM, Cameron Simpson wrote: >> On 03Sep2014 20:59, Tim Chase wrote: >>> - mime-parts can be nested, so I need to recursively handle them >> >> Just to this. IIRC, the MIME part delimiter is supposed to be >> absolute. That is, it will not occur in the nested subparts, if >> any. > > I think the point here is that the validity check of a mime-part may > involve checking sub-parts - eg the message is a mailing list digest > (with one part per actual message), and some of those have > attachments, which are to be stripped off if over 1MB. Indeed, ChrisA divined my intent--an attachment remover based on various types of mime-type and size tests. A cursory search didn't turn up any pre-existing utilities that did quite what I wanted. Perhaps my previous message about detecting mbox-vs-maildir-vs-mh format mailboxes hinted at this. Thanks to all who answered there (though I encountered a possible bug, as Claws Mail doesn't put a .mh_sequences file in what it claims are MH local folders which causes issues with MH() http://bugs.python.org/issue22319 ). So the goal is to keep the original message with highest fidelity while still stripping out the undesirable attachments. Thanks for your thoughts, -tkc
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Best way to filter parts of a email.message.Message Tim Chase <python.list@tim.thechases.com> - 2014-09-04 05:45 -0500
csiph-web