Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 33995 - Teapop known problem with crlf in emails using maildir- fix is available
Summary: Teapop known problem with crlf in emails using maildir- fix is available
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-21 01:00 UTC by Rasheed Abdal-Aziz
Modified: 2004-06-28 20:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
teapop-0.3.8.ebuild (teapop-0.3.8.ebuild,1.41 KB, text/plain)
2004-06-14 13:34 UTC, Cory Visi (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rasheed Abdal-Aziz 2003-11-21 01:00:51 UTC
I wasnt sure where to put this - hopefully it will reach the teapop maintainer.

0.3.7 of teapop has a bug. I located this bug via user emails in MantisBT which 
creates the occasional crlf at the end of header lines instead of jus LF. I 
believe this only affects Maildir users.

I got onto the teapop-users list, and Ibrahim Khalifa helped me find the 
problem, then provided the fix. 

I created a patch and had no problem after re-emerging with the patch in place. 
As this is my first time placing a patch in the ebuild, my patch might not be 
done correctly so I'll supply the message from ibrahim below. And then after 
asking him if i could supply this as a patch to the gentoo teapop maintainer, 
he provided me with the second article here.
-----------------------------------
Edit pop_maildir.c and change the following (from line 192):

        if ((i > 0 && minfo->buf[i-1] == '\n') &&
            (i < 1 || minfo->buf[i-2] != '\r')) {
                curmsg->size++;
                curmsg->lines++;
        }

to

        if (i > 0 && minfo->buf[i-1] == '\n') {
                if (i < 1 || minfo->buf[i-2] != '\r')
                        curmsg->size++;

                curmsg->lines++;
        }

Then recompile by running "make" and install the new binary. Let me know
if this helps.
--------------------------
Hi,

We will be preparing a new release which includes this fix. So you can
either send this fix or wait a day or two and tell them about 0.3.8. =)

//Ibo

On Fri, Nov 21, 2003 at 01:40:54PM +1300, Rasheed Abdal-Aziz wrote:

> PERFECT! :)
> 
> Im a gentoo user. Mind if I submit the patch to the teapop maintainer? 
> 
---------------------------------



Reproducible: Always
Steps to Reproduce:
1. Created a Bug in MantisBT and assigned it to a mantis user
2. That creates an email that is visible in their maildir
3. User attempts to retrieve from teapop 

Actual Results:  
User cannot retrieve from teapop - teapop disconnects when attempting to read 
the file. I think the disconnection is because teapop realises that it has a 
buffer overrun situation?

Expected Results:  
It should work, and does with the patch applied.
Comment 1 Cory Visi (RETIRED) gentoo-dev 2004-06-14 13:33:38 UTC
According to the TeaPop website, version 0.3.8 has been out since November 27, 2003. This package just needs a version bump to fix this bug (and we should probably get rid of the old versions). I tested the lastest ebuild (0.3.7-r1) as 0.3.8 and it unpacked/compiled/installed fine.

On another note, java support seems to be broken within the ebuild. Java support was added in 0.3.7-r1. It's not enough to specify --with-java, you need to give it a directory. I moved java to $myconf, and java was left out of IUSE!

Attached is the fixed 0.3.8 ebuild. I'd say the only possible issue is, is it ok to put $JAVA_HOME in an ebuild? The application should have picked it up anyway, but it doesn't appear to be that smart.
Comment 2 Cory Visi (RETIRED) gentoo-dev 2004-06-14 13:34:33 UTC
Created attachment 33242 [details]
teapop-0.3.8.ebuild
Comment 3 Cory Visi (RETIRED) gentoo-dev 2004-06-28 20:45:09 UTC
teapop-0.3.8 now in portage... please test :)