james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Maurer (JIRA)" <server-...@james.apache.org>
Subject [jira] Created: (JAMES-744) MBoxMailRepository can't parse mboxrd files
Date Sun, 17 Dec 2006 09:40:21 GMT
MBoxMailRepository  can't parse mboxrd files

                 Key: JAMES-744
                 URL: http://issues.apache.org/jira/browse/JAMES-744
             Project: James
          Issue Type: Bug
          Components: MailStore & MailRepository
            Reporter: Norman Maurer
         Assigned To: Norman Maurer
             Fix For: Next Major

>From ml:


I think I've answered my own question and discovered a bug with MBoxMailRepository and a fix
is below.

Line 283
prevMessageStart = ins.getFilePointer() - line.length() ;
should be:
prevMessageStart = ins.getFilePointer() - line.length() - 2;
This is the case because we need to subtract -1 to back up in front of the character we are
looking for and -1 because the readLine doesnt return the carriage return
Now the preMessageStart points to the F character in the pattern From .......

and line 413
ins.seek(messageStart -1);
should be:
ins.seek(messageStart );
Given that the messageStart now points at the F character there is no longer a need to back
up one character.

The full file is attached.

Now I can parse Thunderbird mail files without a problem


> I've been trying to use the MBoxMailRepository to parse a Thunderbird mail file.
> It doesnt seem to work propely. (After loading the messages, the retrieve operation quite
often doesnt return a message for a key).
> Is this because the MBoxMailRepository class doesnt support mboxrd? 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message