[Spambayes] Supurious '>' in bodytext

Tony Meyer tameyer at ihug.co.nz
Thu Feb 24 01:30:15 CET 2005


Interestingly, the original message was displayed like this for me in
Outlook:

"""
if you have a message that has lines like:
>From now on this must stop.

The line is rewritten as:
> From now on this must stop.

That is to say, a '>' and a space is prefixed to any line that starts with 
'From'.
"""

IOW, there was a '>' inserted before the From somewhere along the line.

[Bob Coe]
>> It must be a reflection of the old Unix "sendmail" convention, in 
>> which any line beginning with capital F was prepended with 
>> a caret to keep it from being confused with a "From" line (which would 
>> indicate the beginning of a new message).

The Python email package is slightly smarter in that it looks for "From "
rather than just "F* ".  This happens in as_string() - it's mentioned in the
documentation and there's an example of how to use email.Generator with
mangle_from_=False which means that this won't happen.

[Mike Causer]
> It's actually not connected with the MTA in use, but is 
> necessary if the mail is ever stored in "mbox" format instead 
> of "mdir" or a proprietary encoding such as pst.  The MTA I 
> use, Postfix, uses mbox for its incoming storage, although my 
> mailreader, Sylpheed, uses mdir once it's received the mail.  
> This means that any receiving MTA which uses mbox (certainly 
> Sendmail, Postfix, Exim, etc) _must_ add the ">", and others 
> may add it for safety's sake.

So what do people think that imapfilter should do in this case?  It's a
fairly simple change from using as_string to the example code in the
documentation.  ISTM that if the mangling is necessary that the IMAP server
would do it (we wouldn't want to do this with something like sb_filter,
though).  However, I wouldn't want to break anything.

=Tony.Meyer

-- 
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes.
http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this.



More information about the Spambayes mailing list