[Patches] Unix Mailboxes don't work quite right.
M.-A. Lemburg
mal@lemburg.com
Sun, 18 Jun 2000 12:11:56 +0200
John Viega wrote:
>
> The method "_isrealfromline" in mailbox.UnixMailbox doesn't handle some
> real email messages. I've noticed this by comparing Python's notion of
> a Mailbox with that of real mailers. In this particular case, one of my
> real mailboxes has several messages without a time zone offset included,
> and Python doesn't treat those from lines as the start of a message.
Those messages are likely to be spam :-)
>
> I've looked around, and it seems that real mailers seem to treat any
> sequence of "\nFrom " as a from line.
>
> With that in mind, I'd suggest the following changes:
>
> Delete lines 104-113.
> Change "_isrealfromline" to:
>
> def _isrealfromline(self, line): return 1
>
> If people want the original behavior for whatever reason, they can
> override it, but this change would make Python much more compatible with
> mailers, etc.
Why not fix the RE to also match the messages you are seeing
your mail box file instead of removing the check completely ?
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/