[Spambayes] email parse_headers error

Zander zander at zan.com
Tue May 27 14:01:48 EDT 2003


So - the fact that the HeaderParseError() exception isn't handled gracefully
by pop3proxy.py has essentially rendered it useless for me.  It simply
throws an error and halts proxying the e-mail communication.  I'm not sure
what the plan is for this, but I wanted to see where current thinking had
gone:

1. Is there a newer version of email which allows for more tolerance these
non-RFC-2822 compliant e-mails?  I doubt it, because I would think that the
intent of the package is to handle confirmant messages.

2. Is there any thought to a simple pre-processing step which would make
sure that the last line of headers is appropriately formed *and would fudge
it* if not?  (In my experience, this is 99% of the malformed headers:
garbage/beginning of the message  on the last line of headers without an
extra newline)

3. How about an exception handler that tries to fix the header?  Possibly as
simple as catching the parse error and iteratively inserting a newline at
the last line of headers until it no longer throws the exception.

4. If not a exception handler that fixes - is there a simple mechanism that
could work like a "pass" to allow this message through.

As it is now, I need to manually RETR the message so that the rest can go
through the proxy which is extremely annoying, so I wish I could revert back
to the version I was using a few months ago (which worked ok, but simply
left as "unsure" the ones where the parser was confused)

- Z






More information about the Spambayes mailing list