#891 From lines get mangled by sb_filter.py

Source code - CVS
open
hammie (42)
5
2009-12-17
2009-12-17
No

I installed the SVN code to get around the From escaping problem discussed on these pages:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559977
https://sourceforge.net/tracker/?func=detail&aid=2908573&group_id=61702&atid=498103

However, messages still get mangled by the latest SVN code (revision 3255): the first From header of a messages is stripped. As a result, messages stored in mbox files on a Linux server are invisible to mail readers such as Thunderbird (IMAP access) and Mutt (local access).

Discussion

  • Alexandre Ratti

    Alexandre Ratti - 2009-12-17
    • assigned_to: nobody --> montanaro
     
  • Alexandre Ratti

    Alexandre Ratti - 2009-12-17

    I clicked Submit too fast; I wanted to attach files for testing and now I can't. So I uploaded the files to:

    http://alexandre.ratti.free.fr/sb/

    To test, I first mailed myself a message with the command line "mail" utility. This message went through my system (procmail and clamav), but it was NOT filtered by spambayes (deactivated in .procmailrc).

    Then I filter the message through sb_filter.py on the command line and I created a diff. As you can see, the first From line is missing from the processed message.

    I'm assigning this report to user "montanaro" since he checked in the fix for the From escaping issue.

    Thanks.

     
  • Skip Montanaro

    Skip Montanaro - 2009-12-17

    Alexandre, what SpamBayes tool demonstrates this problem? I tested the change using sb_filter.py. It seems you're seeing this with another one of the SpamBayes tools.

     
  • Alexandre Ratti

    Alexandre Ratti - 2009-12-17

    I'm actually seeing this with sb_filter.py. To double-check, I just ran:

    cat test-message.txt | sb_filter.py > take2.txt
    diff -u test-message.txt take2.txt > take2.diff

    I'm getting the same result. First "From" line is deleted.

    which sb_filter.py
    /usr/bin/sb_filter.py

    This is what I have in sb_filter.py:

    #!/usr/bin/python
    # EASY-INSTALL-SCRIPT: 'spambayes==1.1b1','sb_filter.py'
    __requires__ = 'spambayes==1.1b1'
    import pkg_resources
    pkg_resources.run_script('spambayes==1.1b1', 'sb_filter.py')

    I installed this Spambayes copy from SVN. To get it:
    1) I checked out trunk two days ago.
    2) I made a source release with "python setup.py sdist --formats gztar".
    3) I installed this release (with "setup.py install", I think).

    Do you think I have a version mixup?

     
  • Alexandre Ratti

    Alexandre Ratti - 2009-12-18

    Update. What I understood so far:

    1) Spambayes 1.03 + mail 2.5.4 (from Python 2.3) -> no problem. This was the Debian Sarge setup.

    2) Spambayes 1.04 + mail 2.5.4 (from Python 2.3) -> no problem.

    3) Spambayes 1.03 + mail 3.0.2 (from Python 2.4) -> broken.

    4) Spambayes 1.04 + mail 3.0.2 (from Python 2.4) -> broken. This is what happens on Debian Etch and Lenny.

    5) Spambayes 1.1 from SVN (revision 3256 checked in today): mangles every test message I send from Thunderbird 2. Spambayes headers (X-Spambayes-*) get inserted just after the first "From" header. See previous bug report:

    https://sourceforge.net/tracker/?func=detail&aid=2908573&group_id=61702&ati
    d=498103

     
  • Skip Montanaro

    Skip Montanaro - 2009-12-19

    Thanks for the report. Obviously the fix is going to be a little tougher than I first thought. I've
    reverted the previous change.

     

Log in to post a comment.