Btw, could the issue come from the transfer between BSD and Windows (think to LF vs CRLF) ?
Eric

On 07/25/2012 12:23 PM, Eric Charles wrote:
Hi,
Can you open a JIRA and attach there a mail coming from Exim (zip it to
not alter the content).

 From RFC 2822, lines must be separated with CR LF.
http://tools.ietf.org/html/rfc2822

    Messages are divided into lines of characters.  A line is a series of
    characters that is delimited with the two characters carriage-return
    and line-feed; that is, the carriage return (CR) character (ASCII
    value 13) followed immediately by the line feed (LF) character (ASCII
    value 10).  (The carriage-return/line-feed pair is usually written in
    this document as "CRLF".)

Thx,
Eric


On 07/25/2012 10:35 AM, Tóth István Zoltán wrote:
Hi,

Only the target is James, the current system I would like to migrate
from is Exim 4.69-1 which uses the maildir format.

I've copied the maildir directory built by Exim to
JAMES_HOME/var/store/maildir/

Then I've executed the maildir to JPA copy.

And I've also tested this on Mac OS X (actually I did most of my testing
on Mac OS X, sorry, silly of me to forget).

I suspect that code because if I change the "\r" to "\r\n" everything
works like a charm.

I guess your test was successful because James actually uses "\r\n" when
it stores the message in maildir format. Only problem I'm coming from
Exim.

Thx,
Istvan


7/25/12 10:17 AM keltezéssel, Eric Charles írta:
Hi,
So you copy from BSD Maildir to Windows embedded Derby (2 separate
James installations with same version) ?

Do those both James instances work well (receive, display mails)?

The code you refer to in MaildirMessage allows to get the position at
which the Body of the Message starts (after the headers), so it should
not be the cause of your issue.

Thx, Eric

On 07/24/2012 03:59 PM, Tóth István Zoltán wrote:
Hi,

Source platform: OpenBSD 4.3 / Exim 4.69-1.
Target platform: Windows 2008 Server R2 Standard 64-bit / James
3.0-beta-4 (recompiled it from trunk also)

Java:

     Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
     Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

Database:

     Derby from James distribution.

Code which assumes "\r\n":

     org.apache.james.mailbox.maildir.mail.model.MaildirMessage

     bodyStartOctet

http://svn.apache.org/repos/asf/james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java




     revision 1363286

Kind regards,
tiz

7/24/12 3:41 PM keltezéssel, Eric Charles írta:
Hi,

I exported from Maildir to JPA, and back from JPA to Maildir. It work
all fine: the mail date are correctly shown in the list.

What is your plaform ? (operating system, database, jdk, james
versions).

Can you point the code portion your are talking about in maildir
regarding "\r\n".

Thx, Eric

On 07/20/2012 02:08 PM, Tóth István Zoltán wrote:
Hi,

checked the records in derby, the JAMES_MAIL table for the mails
which
contained only "\n":

MAIL_BODY_START_OCTET = 0
MAIL_CONTENT_OCTETS = size of the file
MAIL_BYTES = the whole file (with "\n")
HEADER_BYTES = null

The one I manually modified to have "\r\n" looks like to be OK in DB,
also the one I've sent in through SMTP.

I've checked the code of the maildir module and it looks for "\r\n"
specifically.

Kind regards,
Istvan


7/19/12 8:49 PM keltezéssel, Eric Charles írta:
Hi,
Normally, the headers data in the database should not contain any
"\n".
The "\n" are added on the fly when creating the response by the
server.

Can you check in the JAMES_HEADER the stored content.

Thx, Eric

On 07/19/2012 08:21 PM, Tóth István Zoltán wrote:
Hi,

I've found the reason of my problem: Exim stored the mail with only
"\n"
in the header.

The copy into JPA kept the "\n" and when Thunderbird requested the
message in IMAP it got the headers separated by "\n" instead of
"\r\n"

I was able to solve the problem by replacing replacing "\n" to
"\r\n",
after that everything worked fine.

What would be the right solution? I could convert all mails with a
small
script or modify the maildir module to handle "\n" endings
properly. (I
see more reason with the second but that's a development question.)

Kind regards,
Istvan


7/17/12 12:59 PM keltezéssel, Eric Charles írta:
Hi,

I remember I did this before, and it worked fine, so this is a
regression. Can you please open a JIRA for so we can fix it?
(https://issues.apache.org/jira/browse/JAMES)

Thx, Eric

On 07/14/2012 04:51 PM, Tóth István Zoltán wrote:
Hi,

I'm trying to migrate our e-mails stored in maildir into James
3.0-beta4
JPA.
I've used the mailboxcopier.copy( "maildir-mailboxmanager",
"jpa-mailboxmanager") function for the migration.
The mails have been copied into the JPA mailbox and I was able to
read
them through IMAP but in my Thunderbird all mails are dated to
the
time
of the copy operation. To be exact the list of mails shows wrong
dates,
when I open the e-mail the correct date is shown.

For my tests I've copied the maildir of a test account, I've
checked the
date of files imported and they looks like to be correct.

Thank you for your help,
Kind regards,
Istvan Zoltan Toth







---------------------------------------------------------------------


To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





--
eric | http://about.echarles.net | @echarles


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to