From: Sheila K. <sh...@th...> - 2004-07-01 17:32:18
|
--On Thursday, July 01, 2004 3:08 PM +1000 Richard Jones <ric...@op...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tue, 29 Jun 2004 07:55 pm, alexander smishlajev wrote: >> have you tried to use this package before? > > No, although we do have some code copied from the email package in the > Roundup source. I have done the same with an application that I worked on. That application is a spam filtering app with a web interface for clients who host at the same web hosting service that I use. In my experience, the email module is GREAT for creating new emails. The problems that we have had with it, were in parsing incoming emails of varied and unknown source. Previous versions of the email module were very strict and unforgiving in their parsing of emails. This meant that many spam emails, which are often not formatted according to RFCs, would cause the module to throw exceptions. More recent versions of the email module have a more forgiving option to parse with strict mode off, and I believe this is the default? While it is *better*, it still fails to parse quite a number emails that are received by myself and by the users of my spam filtering app. Therefore, we have subclassed the Parser class in the parser module, so that it will handle more badly formatted emails. We are able to use the rest of the email module as-is as, in our case at least, it is only the parser methods that are not satisfactory for our app. Anyhow, just sharing this information. Don't know if this will be a problem for roundup, or if you can pretty much assume that the email received should parse easily. >> we have used email package instead of mimetools, as it is recommended in >> python library reference, and i came to conclusion that it was a big >> mistake. when the code was long past the "proof-of-concept" stage, we >> found that something that seemed like "minor customization" nearly >> required the engine change. (i do not remember exact details now; >> afaict it was something about charsets and/or encodings.) we did find a >> solution, but it was extremely hackerish and unpleasant. > > Hrm :( In my conversations with Barry Warsaw on the email module, Barry indicated that the design of the email module is intended to be so that it is easy to write your own parser class, for example (as I have done) or your own generator class (possibly by subclassing the given ones already provided in the email module). This appears to be true, as far as I have been able to tell. However, getting familiar enough with the email module to do so is not a minor undertaking. -- Sheila King http://www.thinkspot.net/sheila/ http://www.k12groups.org > Richard > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > > iD8DBQFA45xorGisBEHG6TARAhg4AJ9jYKljiJmnwptEuVwPgRk5xnAHgQCdEzcl > AjPmG1MdZILrfsDOrTYVOI4= > =Vm7z > -----END PGP SIGNATURE----- > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Roundup-devel mailing list > Rou...@li... > https://lists.sourceforge.net/lists/listinfo/roundup-devel > |