You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Guillermo Grandes (JIRA)" <se...@james.apache.org> on 2006/10/03 12:53:19 UTC

[jira] Created: (JAMES-648) Corrupted MIME message with 8bit in body

Corrupted MIME message with 8bit in body
----------------------------------------

                 Key: JAMES-648
                 URL: http://issues.apache.org/jira/browse/JAMES-648
             Project: James
          Issue Type: Bug
    Affects Versions: Trunk
         Environment: James 3.0
            Reporter: Guillermo Grandes


My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:

----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
------_=_NextPart_000_01C0B2DF.DE9D0F20

Creada por: Explotación

Archivo Adjunto?: No
------_=_NextPart_000_01C0B2DF.DE9D0F20--

----------- cut ----------- cut ----------- cut ----------- cut ----------- end

(they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439527 ] 
            
Norman Maurer commented on JAMES-648:
-------------------------------------

So the ToRepository is the first mailet ? If not so plz change it to be the first.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Updated: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-648?page=all ]

Guillermo Grandes updated JAMES-648:
------------------------------------

    Attachment: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore

-Dmail.mime.charset=iso-8859-15 ---- It does not have effect.

-ToRepository : the file that I send in Trace, I have get it from there. Attach the complete file: 
4D61696C313135393436303732323938332D323834.Repository.FileStreamStore

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439526 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

Seem that ... JavaMail? add the Header: "Content-Transfer-Encoding: quoted-printable", is possible?

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439551 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

Confirmed, If mail arribe from root and send this untouched to RemoteDelivery, it sets the "Content-Transfer-Encoding: 7bit"
This is the default in: rfc-2045
Seems that JavaMails... ignore this default.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Stefano Bagnara <ap...@bago.org>.
Guillermo Grandes wrote:
> Well, as I say in JAMES-648, Don't like the idea of reject... And I 
> understand you but...
> 
> I am going to tell a history to you.
> [...]
> I see non-tolerant James to strange mails that receive, compared with 
> Sendmail, Postfix, QMail, IIS,... perhaps James is wonderful to send, 
> but not to receive. ("be conservative in what you send, be liberal in 
> what you receive").

I agree, but the problem sometimes is not that we are non-tolerant, but 
that we lack a feature: in this case 8bitmime.
Your client probably IGNORE the fact that not all servers support 
8bitmime and sends 8bit content anyway. (from the current information 
this is what I understood)

> - reject mails goes against my religion. (As programmer I like the well 
> done things -and RFCs-, but like sysadm my mission is that the things 
> work, beyond if he is good or bad -while he is safe-)

Sometimes rejecting it is better than corrupting it and let the sender 
ignore this. I agree on relaxing when it is clear what you have to do 
and the "workaround" does not introduce ANY possible problem.

Btw, this is sterile discussion. Let's talk about specific problem and 
the specific solution (on the other tree of this thread).

Stefano


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Guillermo Grandes <gu...@gmail.com>.
Well, as I say in JAMES-648, Don't like the idea of reject... And I 
understand you but...

I am going to tell a history to you.

In 2003 in my ex-work requested to me mount an IMAP server (for the 
people -VIP- who traveled), I wanted to use James (it seem to me more secure 
than sendmail and more flexible than postfix) but finally I had to use 
Cyrus-Imapd, all we know the reason.

A few months ago in the company where work since 2004 they ordered to me to 
mount an Anti-Spam system, I preferred James of course.

Thursday 28/Sep the relay of the IIS that we were using was broken (in 
office), was the perfect opportunity to put James but... I have bad luck, 
because it seems that I am fighting against a wall, first Oracle (and his 
brackets <>), next with HP and his missing encoding-headers, and more 3rd 
parties that send strange mails. Peculiarly, in the 2-3 years that I take 
using those things, the smtp of the IIS has not given problems (it swallows 
everything), now with James yes I have a few problems.

Today (Food's time) I have returned to install the IIS (sadly).

I see non-tolerant James to strange mails that receive, compared with 
Sendmail, Postfix, QMail, IIS,... perhaps James is wonderful to send, but 
not to receive. ("be conservative in what you send, be liberal in what you 
receive").

Obvious things:
- nobody is perfect.
- the lap belts would not have to exist; people would have to drive the car 
well.
- the Spam would not have to exist, but we wrote systems anti-Spam instead 
of shouting: "you do not send Spam, reads the RFC!!".
- the mail servers are for communicating.
- reject mails goes against my religion. (As programmer I like the well done 
things -and RFCs-, but like sysadm my mission is that the things work, 
beyond if he is good or bad -while he is safe-)

In my mind We would have to do all the possible to send well mails, but 
still more, to do the impossible thing to read/parse the received mails. In 
parallel with this imperfect world, warn to sysadm so that he can speak with 
the person that can correct the problem, without losing mail while the 
problem is corrected.

This is not a RFC violation. We called he: accomplish a mission. 
Communication.

--- Guillermo

----- Original Message ----- 
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Developers List" <se...@james.apache.org>
Sent: Tuesday, October 03, 2006 9:28 PM
Subject: Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit 
in body


> Guillermo Grandes (JIRA) wrote:
>>     [ 
>> http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439630 ] 
>> Guillermo Grandes commented on JAMES-648:
>> -----------------------------------------
>>
>> Reject... (I change corrupt but readable, by mail to trash), No, I don't 
>> like the idea,...
>
> Well, rejecting it make the sender aware of the problem.
> Otherwise you receive it corrupted: either way the message is invalid so 
> it id not a big problem if it is corrupted even more.
>
>> But seem that in this case the one that violates more the RFC is 
>> JavaMail, that places "quoted-printable" instead of "7bit" in a message 
>> without Content-Transfer-Encoding when modify any header of msg.
>
> Well, I don't like JavaMail, and I lost a lot of days try to workaround 
> its MANY bugs, but I think this time it is not javamail that is doing it 
> wrong.
>
> It is clearly stated everywhere that you cannot have 8bit chars in the 
> text of a message unless you use Content-Transfer-Encoding: 8bit. If no 
> content-transfer-encoding is there there is no rule about what to do.
>
> Javamail adds quoted-printable simply because it find the 8bit char: try 
> removing the 8bit char and I bet that Javamail won't add the 
> Content-Transfer-Encoding anymore.
>
> So the source message is wrong: if you add Content-Transfer-Encoding: 7bit 
> you will change the message and corrupt it more anyway... There is no (I 
> can't see it) clean solution/workaround for this: you can fix some mail, 
> but mangle much more the others if you add workarounds.
>
> Stefano
>
>>> Corrupted MIME message with 8bit in body
>>> ----------------------------------------
>>>
>>>                 Key: JAMES-648
>>>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>>>             Project: James
>>>          Issue Type: Bug
>>>    Affects Versions: Trunk
>>>         Environment: James 3.0
>>>            Reporter: Guillermo Grandes
>>>         Assigned To: Norman Maurer
>>>         Attachments: 
>>> 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, 
>>> james-proccesors.xml, traces.txt
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Stefano Bagnara <ap...@bago.org>.
Guillermo Grandes (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439630 ] 
>             
> Guillermo Grandes commented on JAMES-648:
> -----------------------------------------
> 
> Reject... (I change corrupt but readable, by mail to trash), No, I don't like the idea,...

Well, rejecting it make the sender aware of the problem.
Otherwise you receive it corrupted: either way the message is invalid so 
  it id not a big problem if it is corrupted even more.

> But seem that in this case the one that violates more the RFC is JavaMail, that places "quoted-printable" instead of "7bit" in a message without Content-Transfer-Encoding when modify any header of msg.

Well, I don't like JavaMail, and I lost a lot of days try to workaround 
its MANY bugs, but I think this time it is not javamail that is doing it 
wrong.

It is clearly stated everywhere that you cannot have 8bit chars in the 
text of a message unless you use Content-Transfer-Encoding: 8bit. If no 
content-transfer-encoding is there there is no rule about what to do.

Javamail adds quoted-printable simply because it find the 8bit char: try 
removing the 8bit char and I bet that Javamail won't add the 
Content-Transfer-Encoding anymore.

So the source message is wrong: if you add Content-Transfer-Encoding: 
7bit you will change the message and corrupt it more anyway... There is 
no (I can't see it) clean solution/workaround for this: you can fix some 
mail, but mangle much more the others if you add workarounds.

Stefano

>> Corrupted MIME message with 8bit in body
>> ----------------------------------------
>>
>>                 Key: JAMES-648
>>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>>             Project: James
>>          Issue Type: Bug
>>    Affects Versions: Trunk
>>         Environment: James 3.0
>>            Reporter: Guillermo Grandes
>>         Assigned To: Norman Maurer
>>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt



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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439630 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

Reject... (I change corrupt but readable, by mail to trash), No, I don't like the idea,...

But seem that in this case the one that violates more the RFC is JavaMail, that places "quoted-printable" instead of "7bit" in a message without Content-Transfer-Encoding when modify any header of msg.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12451313 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

Well, I have reviewed the problems, and I have found a small "sanitizer" for extrange Mails:

    try {
        MimeMessage message = (Mail)mail.getMessage();
        // Sanity of "Content-Transfer-Encoding" (non-existent header)
        if (message.getHeader("Content-Transfer-Encoding") == null) {
            BufferedInputStream is = new BufferedInputStream(message.getRawInputStream());
            while (is.available() > 0) {
                if (is.read() > 0x7F) {
                    log.warn(mail.getName() + ": 8bit Stream");
                    message.setHeader("Content-Transfer-Encoding", "8bit");
                    break;
                }
            }
            is.close();
        }
        // Sanity of "Content-Type" (multiple Content-Type headers)
        String [] heads = message.getHeader("Content-Type");
        if ((heads != null) && (heads.length > 1)) {
            message.setHeader("Content-Type", heads[heads.length-1]);
        }
        message.saveChanges();
    } catch (javax.mail.MessagingException me) {
        log.error("MessageingException", me);
    }

This piece of code can be used as Mailet.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Next Major
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>             Fix For: Next Major
>
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Resolved: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-648?page=all ]

Norman Maurer resolved JAMES-648.
---------------------------------

    Fix Version/s: Trunk
       Resolution: Won't Fix

The 8bit problem is fixed now.
I don'T think we find a solution how to handle on the two Content-Type headers. We can't dedicide which one we want to use . So we have to "accept" what  javamail do. So i see no way to fix it in a "clean" way.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>             Fix For: Trunk
>
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439501 ] 
            
Norman Maurer commented on JAMES-648:
-------------------------------------

Thats strange.. So we have to Content-Type: before the RemoteDelivery also.. You use any special mailets ? Can you post your config.xml ? Can you also add a ToRepository at the first place in he root processor?  I whould like to see if the message is defect also on the start ..

Thx for all your help

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439448 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

The problem is in both helo/ehlo, and I do NOT see the "X-MIME-Autoconverted: from 8bit to quoted-printable by Apache JAMES". I suppose that is another thing... but I don't know exactly that is it.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439465 ] 
            
Norman Maurer commented on JAMES-648:
-------------------------------------

IT whould be really helpfull if you could add something like the follow example right before the RemoteDelivery Mailet:

         <mailet match="All" class="ToRepository">
            <repositoryPath> file://var/mail/test/</repositoryPath>
            <passThrough> true </passThrough>
         </mailet>

This will save a copy of the message in filesystem before pass it to RemoteDelivery. I just want to get sure that the message get corrupted in RemoteDelivery

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439545 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

Seems that the problem is the missing "Content-Transfer-Encoding"

If the message is modified by JavaMail (setMimeHeader / removeMimeHeader) JavaMail add a default: "Content-Transfer-Encoding: quoted-printable"

I found a possible workarround (it has worked to me)... After ToRepository, I added:

  <mailet nomatch="HasHeader=Content-Transfer-Encoding" class="SetMimeHeader">
    <name>Content-Transfer-Encoding</name>
    <value>8bit</value>
  </mailet>

But it would be necessary to study if it can have other problem that I have not seen.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Stefano Bagnara <ap...@bago.org>.
Guillermo Grandes (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439554 ] 
>             
> Guillermo Grandes commented on JAMES-648:
> -----------------------------------------
> 
> How you see make a (SMTPHandlerChain) SanitizeHeaders that it sanitize the Mail Headers according to the standard?

We don't support 8bitmime, so it is not a problem with headers: to 
sanitize it you'd have to convert it from 8bit to 7bit, otherwise you 
will encounter again every problem we have when we enable 8bitmime. So 
there is no way-out. The only improvement I can see now is to find a way 
to reject the message at the source (SMTP DATA) as it is invalid content.

Stefano


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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439554 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

How you see make a (SMTPHandlerChain) SanitizeHeaders that it sanitize the Mail Headers according to the standard?

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Updated: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-648?page=all ]

Guillermo Grandes updated JAMES-648:
------------------------------------

    Attachment: traces.txt

Attach a trace file... where is the problem?

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Attachments: traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439539 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

NM> So the ToRepository is the first mailet ?

Yes, it is the first. 

You can see the james-proccesors.xml (sub-set of config.xml) (I always put ToRepository First in dev-servers for debugging).

The attached files are those that you have requested to me :-)

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439552 ] 
            
Stefano Bagnara commented on JAMES-648:
---------------------------------------

You have a message with 8bit content and without "Content-Transfer-Encoding: 8bit": this is not RFC2822 compliant.
Furthermore we probably could even reject it on the SMTP side as 8bit content is not allowed when the server does not expose 8BITMIME extension.

So if I understood correctly the scenario your client is violating 2 rfc rules and we should close this issue because it is an issue in the client. If you think this is not the case please let us know why so that we can investigate further on this issue.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Assigned: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-648?page=all ]

Norman Maurer reassigned JAMES-648:
-----------------------------------

    Assignee: Norman Maurer

Can it be related to: JAMES-638 ?



> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Updated: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-648?page=all ]

Guillermo Grandes updated JAMES-648:
------------------------------------

    Attachment: james-proccesors.xml

"Can you also add a ToRepository at the first place in he root processor?" -> I have ToRepository in Root processor, the file Attached is from ToRepository at root processor.

Special mailets... in this server, nothing more special (only a BeanShell that remove a list of headers "X-..."). Attach james-proccesors.xml to see this, the rest is... equal.

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439469 ] 
            
Norman Maurer commented on JAMES-648:
-------------------------------------

Maybe you could also try to add the following OPT to JVM_OPTS in phoenix.sh:

 -Dmail.mime.charset=iso-8859-15

Please tell us if it works

> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Stefano Bagnara <ap...@bago.org>.
Guillermo Grandes wrote:
> EHLO Stefano :-)
> 
> I have test this, work "half" ;-)

Better half than nothing ;-)

> Now body is not corrupted, Content-Transfer-Encoding is set to 8bit, but 
> the header:
> 
>> Content-Type: multipart/mixed; 
>> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"
> 
> Is removed and only maintains: "Content-Type: text/plain; 
> charset=iso-8859-1"
> 
> ... the never ending story ... :-)

Well, they was 2 issues. If I fixed one of them supporting 8bitmime I'm 
happy for this.

The second issue is that your mail has 2 Content-Types: do you modify 
this message having 2 Content-Types via javamail for any conversion? Or 
it happens anyway because it adds the Content-Transfer-Encoding to 8bit?

Either way we have to define what to do in this scenario: we have 2 
content-types. I'm not sure what we have to do when we try to parse such 
a message. Maybe that it is correct to keep only one of them, and we 
can't choose between them.

This seems a very specific case: can you try adding a Mailet to fix that 
specific case? Maybe you can use something similar:
---
String[] strings = mimeMessage.getHeader("Content-Type");
if (strings.length == 2) {
   mimeMessage.setHeader("Content-Type",string[1]);
}
---

> I want test the other non-issued problem in the work, I will comment to 
> you tomorrow.
> 
> --- Guillermo

I'm looking forward for your test!

Stefano


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Guillermo Grandes <gu...@gmail.com>.
EHLO Stefano :-)

I have test this, work "half" ;-)

Now body is not corrupted, Content-Transfer-Encoding is set to 8bit, but the 
header:

> Content-Type: multipart/mixed; 
> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"

Is removed and only maintains: "Content-Type: text/plain; 
charset=iso-8859-1"

... the never ending story ... :-)

I want test the other non-issued problem in the work, I will comment to you 
tomorrow.

--- Guillermo

----- Original Message ----- 
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Developers List" <se...@james.apache.org>
Sent: Wednesday, October 04, 2006 8:58 PM
Subject: Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit 
in body


> Guillermo Grandes wrote:
>>>> [I think that supporting a relaxed interpretation is MUCH MORE 
>>>> difficult]
>>>> Yes, I know,... the life is thus.
>>
>>> You trucated the line. This way make no sense.
>>> I said that supporting the relaxed intepretation was much more difficult
>>> than supporting 8bitmime that is an rfc spec and would have probably
>>> solved your problem anyway. But this was only a consideration: I don't
>>> have time to work on any of this issue now.
>>
>> Have sense, all is difficult, all depends/question of time, "more things,
>> few time"..., I understand, we will see that we can do :-)
>
> I just updated javamail to 1.4.1ea-SNAPSHOT from 15/Sep/2006 and 
> decommented all of the previously disabled 8bitmime support code and tests 
> seems to pass now.
>
> You can find a binary build of the current trunk here:
>
> http://jamesdev.void.it:8080/continuum/servlet/browse?file=10/dist/james-3.0-dev/downloads/bin/james-binary-3.0-dev.zip
>
> Please let me know if you are able to test this and what are the results.
>
>>> [...]
>>> I see that project glassfish started to fix a few of the bugs I reported
>>> against javamail: imho it worth investigating more on this as soon as 
>>> they
>>> will release a new beta.
>>
>> Agreed. :-)
>>
>> Thanks.
>> Guillermo
>
> I checked the glassfish project and I found that they already released a 
> new beta a couple of weeks ago, so I ran a few tests and updated our code 
> to test it: the result is the build above.
>
> Hope this fix you issue,
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Guillermo Grandes <gu...@gmail.com>.
Hi Norman!

If I don't use James, the message is passed to other server (IIS, Exchange, 
etc) untouched... (nothing changes)

IMHO, I think that these other servers don't see the content, only envelope 
and nothing more (If James is configured without any mailet, James acts as 
an standard server, and all work ok). But with Mailets/JavaMail, James is 
more "sophisticated", and... more sensible to Mime violations.

--- Guillermo

----- Original Message ----- 
From: "Norman Maurer" <nm...@byteaction.de>
To: "James Developers List" <se...@james.apache.org>
Sent: Thursday, October 05, 2006 9:11 AM
Subject: Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit 
in body


> Hi Guillermo,
>
> just an question .. How looks the message if you not use james ? It have 
> still to Content-Type headers ?
>
> bye
> Norman
>
> Guillermo Grandes schrieb:
>> EHLO Stefano :-)
>>
>> I have test this, work "half" ;-)
>>
>> Now body is not corrupted, Content-Transfer-Encoding is set to 8bit, but 
>> the header:
>>
>>> Content-Type: multipart/mixed; 
>>> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"
>>
>> Is removed and only maintains: "Content-Type: text/plain; 
>> charset=iso-8859-1"
>>
>> ... the never ending story ... :-)
>>
>> I want test the other non-issued problem in the work, I will comment to 
>> you tomorrow.
>>
>> --- Guillermo
>>
>> ----- Original Message ----- From: "Stefano Bagnara" <ap...@bago.org>
>> To: "James Developers List" <se...@james.apache.org>
>> Sent: Wednesday, October 04, 2006 8:58 PM
>> Subject: Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 
>> 8bit in body
>>
>>
>>> Guillermo Grandes wrote:
>>>>>> [I think that supporting a relaxed interpretation is MUCH MORE 
>>>>>> difficult]
>>>>>> Yes, I know,... the life is thus.
>>>>
>>>>> You trucated the line. This way make no sense.
>>>>> I said that supporting the relaxed intepretation was much more 
>>>>> difficult
>>>>> than supporting 8bitmime that is an rfc spec and would have probably
>>>>> solved your problem anyway. But this was only a consideration: I don't
>>>>> have time to work on any of this issue now.
>>>>
>>>> Have sense, all is difficult, all depends/question of time, "more 
>>>> things,
>>>> few time"..., I understand, we will see that we can do :-)
>>>
>>> I just updated javamail to 1.4.1ea-SNAPSHOT from 15/Sep/2006 and 
>>> decommented all of the previously disabled 8bitmime support code and 
>>> tests seems to pass now.
>>>
>>> You can find a binary build of the current trunk here:
>>>
>>> http://jamesdev.void.it:8080/continuum/servlet/browse?file=10/dist/james-3.0-dev/downloads/bin/james-binary-3.0-dev.zip
>>>
>>> Please let me know if you are able to test this and what are the 
>>> results.
>>>
>>>>> [...]
>>>>> I see that project glassfish started to fix a few of the bugs I 
>>>>> reported
>>>>> against javamail: imho it worth investigating more on this as soon as 
>>>>> they
>>>>> will release a new beta.
>>>>
>>>> Agreed. :-)
>>>>
>>>> Thanks.
>>>> Guillermo
>>>
>>> I checked the glassfish project and I found that they already released a 
>>> new beta a couple of weeks ago, so I ran a few tests and updated our 
>>> code to test it: the result is the build above.
>>>
>>> Hope this fix you issue,
>>> Stefano
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-dev-help@james.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>> !EXCUBATOR:1,4524357953072053517846!
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Norman Maurer <nm...@byteaction.de>.
Hi Guillermo,

i think thats exactly the point! If you want to alter/modify a message 
and the message is not rfc complicant you must expect such problems. I 
don't think there is many we can do. Maybe we could "rename" on of the 
Content-Type headers but i think that is not a good solution.

If you really want todo so you should do it in a costum mailet. That for 
what mailets are ;-)

bye
Norman



Guillermo Grandes schrieb:
> Hi Norman!
>
> If I don't use James, the message is passed to other server (IIS, 
> Exchange, etc) untouched... (nothing changes)
>
> IMHO, I think that these other servers don't see the content, only 
> envelope and nothing more (If James is configured without any mailet, 
> James acts as an standard server, and all work ok). But with 
> Mailets/JavaMail, James is more "sophisticated", and... more sensible 
> to Mime violations.
>
> --- Guillermo
>
> ----- Original Message ----- From: "Norman Maurer" <nm...@byteaction.de>
> To: "James Developers List" <se...@james.apache.org>
> Sent: Thursday, October 05, 2006 9:11 AM
> Subject: Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 
> 8bit in body
>
>
>> Hi Guillermo,
>>
>> just an question .. How looks the message if you not use james ? It 
>> have still to Content-Type headers ?
>>
>> bye
>> Norman
>>
>> Guillermo Grandes schrieb:
>>> EHLO Stefano :-)
>>>
>>> I have test this, work "half" ;-)
>>>
>>> Now body is not corrupted, Content-Transfer-Encoding is set to 8bit, 
>>> but the header:
>>>
>>>> Content-Type: multipart/mixed; 
>>>> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"
>>>
>>> Is removed and only maintains: "Content-Type: text/plain; 
>>> charset=iso-8859-1"
>>>
>>> ... the never ending story ... :-)
>>>
>>> I want test the other non-issued problem in the work, I will comment 
>>> to you tomorrow.
>>>
>>> --- Guillermo
>>>
>>> ----- Original Message ----- From: "Stefano Bagnara" <ap...@bago.org>
>>> To: "James Developers List" <se...@james.apache.org>
>>> Sent: Wednesday, October 04, 2006 8:58 PM
>>> Subject: Re: [jira] Commented: (JAMES-648) Corrupted MIME message 
>>> with 8bit in body
>>>
>>>
>>>> Guillermo Grandes wrote:
>>>>>>> [I think that supporting a relaxed interpretation is MUCH MORE 
>>>>>>> difficult]
>>>>>>> Yes, I know,... the life is thus.
>>>>>
>>>>>> You trucated the line. This way make no sense.
>>>>>> I said that supporting the relaxed intepretation was much more 
>>>>>> difficult
>>>>>> than supporting 8bitmime that is an rfc spec and would have probably
>>>>>> solved your problem anyway. But this was only a consideration: I 
>>>>>> don't
>>>>>> have time to work on any of this issue now.
>>>>>
>>>>> Have sense, all is difficult, all depends/question of time, "more 
>>>>> things,
>>>>> few time"..., I understand, we will see that we can do :-)
>>>>
>>>> I just updated javamail to 1.4.1ea-SNAPSHOT from 15/Sep/2006 and 
>>>> decommented all of the previously disabled 8bitmime support code 
>>>> and tests seems to pass now.
>>>>
>>>> You can find a binary build of the current trunk here:
>>>>
>>>> http://jamesdev.void.it:8080/continuum/servlet/browse?file=10/dist/james-3.0-dev/downloads/bin/james-binary-3.0-dev.zip 
>>>>
>>>>
>>>> Please let me know if you are able to test this and what are the 
>>>> results.
>>>>
>>>>>> [...]
>>>>>> I see that project glassfish started to fix a few of the bugs I 
>>>>>> reported
>>>>>> against javamail: imho it worth investigating more on this as 
>>>>>> soon as they
>>>>>> will release a new beta.
>>>>>
>>>>> Agreed. :-)
>>>>>
>>>>> Thanks.
>>>>> Guillermo
>>>>
>>>> I checked the glassfish project and I found that they already 
>>>> released a new beta a couple of weeks ago, so I ran a few tests and 
>>>> updated our code to test it: the result is the build above.
>>>>
>>>> Hope this fix you issue,
>>>> Stefano
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-dev-help@james.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-dev-help@james.apache.org
>>>
>>> !EXCUBATOR:1,4524357953072053517846!
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
> !EXCUBATOR:1,45251f3453071349014425!



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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Norman Maurer <nm...@byteaction.de>.
Hi Guillermo,

just an question .. How looks the message if you not use james ? It have 
still to Content-Type headers ?

bye
Norman

Guillermo Grandes schrieb:
> EHLO Stefano :-)
>
> I have test this, work "half" ;-)
>
> Now body is not corrupted, Content-Transfer-Encoding is set to 8bit, 
> but the header:
>
>> Content-Type: multipart/mixed; 
>> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"
>
> Is removed and only maintains: "Content-Type: text/plain; 
> charset=iso-8859-1"
>
> ... the never ending story ... :-)
>
> I want test the other non-issued problem in the work, I will comment 
> to you tomorrow.
>
> --- Guillermo
>
> ----- Original Message ----- From: "Stefano Bagnara" <ap...@bago.org>
> To: "James Developers List" <se...@james.apache.org>
> Sent: Wednesday, October 04, 2006 8:58 PM
> Subject: Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 
> 8bit in body
>
>
>> Guillermo Grandes wrote:
>>>>> [I think that supporting a relaxed interpretation is MUCH MORE 
>>>>> difficult]
>>>>> Yes, I know,... the life is thus.
>>>
>>>> You trucated the line. This way make no sense.
>>>> I said that supporting the relaxed intepretation was much more 
>>>> difficult
>>>> than supporting 8bitmime that is an rfc spec and would have probably
>>>> solved your problem anyway. But this was only a consideration: I don't
>>>> have time to work on any of this issue now.
>>>
>>> Have sense, all is difficult, all depends/question of time, "more 
>>> things,
>>> few time"..., I understand, we will see that we can do :-)
>>
>> I just updated javamail to 1.4.1ea-SNAPSHOT from 15/Sep/2006 and 
>> decommented all of the previously disabled 8bitmime support code and 
>> tests seems to pass now.
>>
>> You can find a binary build of the current trunk here:
>>
>> http://jamesdev.void.it:8080/continuum/servlet/browse?file=10/dist/james-3.0-dev/downloads/bin/james-binary-3.0-dev.zip 
>>
>>
>> Please let me know if you are able to test this and what are the 
>> results.
>>
>>>> [...]
>>>> I see that project glassfish started to fix a few of the bugs I 
>>>> reported
>>>> against javamail: imho it worth investigating more on this as soon 
>>>> as they
>>>> will release a new beta.
>>>
>>> Agreed. :-)
>>>
>>> Thanks.
>>> Guillermo
>>
>> I checked the glassfish project and I found that they already 
>> released a new beta a couple of weeks ago, so I ran a few tests and 
>> updated our code to test it: the result is the build above.
>>
>> Hope this fix you issue,
>> Stefano
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
> !EXCUBATOR:1,4524357953072053517846!



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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Stefano Bagnara <ap...@bago.org>.
Guillermo Grandes wrote:
>>> [I think that supporting a relaxed interpretation is MUCH MORE 
>>> difficult]
>>> Yes, I know,... the life is thus.
> 
>> You trucated the line. This way make no sense.
>> I said that supporting the relaxed intepretation was much more difficult
>> than supporting 8bitmime that is an rfc spec and would have probably
>> solved your problem anyway. But this was only a consideration: I don't
>> have time to work on any of this issue now.
> 
> Have sense, all is difficult, all depends/question of time, "more things,
> few time"..., I understand, we will see that we can do :-)

I just updated javamail to 1.4.1ea-SNAPSHOT from 15/Sep/2006 and 
decommented all of the previously disabled 8bitmime support code and 
tests seems to pass now.

You can find a binary build of the current trunk here:

http://jamesdev.void.it:8080/continuum/servlet/browse?file=10/dist/james-3.0-dev/downloads/bin/james-binary-3.0-dev.zip

Please let me know if you are able to test this and what are the results.

>> [...]
>> I see that project glassfish started to fix a few of the bugs I reported
>> against javamail: imho it worth investigating more on this as soon as 
>> they
>> will release a new beta.
> 
> Agreed. :-)
> 
> Thanks.
> Guillermo

I checked the glassfish project and I found that they already released a 
new beta a couple of weeks ago, so I ran a few tests and updated our 
code to test it: the result is the build above.

Hope this fix you issue,
Stefano


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Guillermo Grandes <gu...@gmail.com>.
>> - James-642, missign brackets, by Oracle / Facturation Systems, nightly
>> this send mails with new registers, notifies facturation state's.
>
> I already said my opinion: imho we should support this by default. But
> other committers don't agree, so we have probably to vote about this, and
> for sure this won't happen for 2.3, so there is no hurry now.
> I hope that the patch temporarily works for you, in the mean time.

I have switched to IIS by the other problems, but also I think that it would
have to go in the 2.3 for all users.

>> - James-648, missing 7/8bit header, by HP OpenView ServiceDesk
>> (management
>> of incidences, seemed to Jira, but greater), mail arrives and now user
>> can
>> see the NextPart-boundary in the mail-reader (this is the corrupt efect,
>> mail is interpreted as plain-text instead of multipart in the
>> mail-reader).
>>
>> - non-issued, also missing 7/8bits header, process of register
>> (automatic)
>> in a system of tickets for management of work orders, this send a url to
>> mail: "http://pepe/register.dll?user=41223483" to confirm the sign-in,
>> but
>> the mail-reader see: "http://pepe/register.dll?usera223483" and register
>> can't be completed, I suppose that the problem is like James-648 (the
>> problem with this application is that the company that made the
>> development... closed -bankruptcy-, We can't correct this).

> Yes, they are both the same issue and it is the result of a serie of
> problems:

> 1. Your client is issuing 8bit chars in an HELO conversation (RFC2821
> don't allow this).

correct.

> 2. Javamail when have to serialize a parsed message try to understand
> wether it was 8bit or not, and if it was 8bit it try to convert it to
> quoted-printable: there is a bug that prevent this from working and make
> javamail to add the quoted-printable header and to not convert the
> content.

ok.

> 3. Once saved javamail reopen it, and it is a quoted-printable having an
> "=41" in the content so it reads it as an "a" and corrupt it.

'':-(

> A similar problem also exists with some email client writing 8bit chars in
> headers: Unfortunately there is not a clean way to handle this. What
> encoding should you use? How should you convert them?

I only have the attachs. I don't known how these applications work
internally, but in my machines I have tested JVM/James with ISO-8859-1 and
ISO-8859-15

>> These are only comments/examples of why don't reject if another option is
>> possible...

> Agree, but if another "GOOD" and compliant option is possible.
> Currently I don't have such an option for this problem but waiting for
> javamail to fix the bug and for us to correctly support 8bitmime.
> Maybe you have this option, or maybe we can find this tomorrow or the next
> month.

Well, a stone more... is... a stone less (philosophy) :-)

>> [I think that supporting a relaxed interpretation is MUCH MORE difficult]
>> Yes, I know,... the life is thus.

> You trucated the line. This way make no sense.
> I said that supporting the relaxed intepretation was much more difficult
> than supporting 8bitmime that is an rfc spec and would have probably
> solved your problem anyway. But this was only a consideration: I don't
> have time to work on any of this issue now.

Have sense, all is difficult, all depends/question of time, "more things,
few time"..., I understand, we will see that we can do :-)

>> [Sorry but I didn't understand where is currupted the mime boundary: I
>> just looked at message source and it seems that the mime boundary is
>> untouched. Can you tell me more?]

>> Yes, the message always is untouched (and is received/interpreted well by
>> mail-reader) EXCEPT when you modify mail in a mailet/use:

>>    mail.getMessage().saveChanges();

>> In this moment JavaMail change headers (sets the missing header:
>> Content-Transfer-Encoding: quoted-printable) and... the outbound
>> mail -seems good at first- is not good. My try to fix this is set missing
>> header with 7bit/8bit (and work. Norman question if JAMES-638 is related.
>> is possible? that affect locally-generated or modified?. I don't known)

> But does it happen only when there is an 8bit char or always?

In this case, depends, if remove 8bits chars, works.
But are more causes (down I explain them).

> About the 8bit sender client can you confirm that your client is using
> HELO (like you reported in the attached test) *AND* *NOT* EHLO?

Client uses ONLY HELO (is behind a Cisco-PIX)

> Sorry if I ask again but I don't want to fix a problem I don't understand.
> Furthermore I see that in the first attachment the input mail has 2
> Content-Type headers: how can we know what is the right one to use?

IMHO think that client "would not have to" send the text/plain if already
send multipart. but I don't know.

> ----
>> 220 ESMTP Server
>> HELO xxxxxxXX.com
> ...
>> DATA
>> 354 Ok Send data ending with <CRLF>.<CRLF>
>> MIME-Version: 1.0
>> Reply-To: <xxxxx>
>> From: "xxxxxx" <xxxxx>
>> To: <xxxxx>
>> Date: Thu, 28 Sep 06 18:26:46 +0200
>> Subject: xxxx #xxxx xxxx
>> X-Mailer: hp OpenView service deskMail Manager 4.5
>> Content-Type: text/plain; charset=iso-8859-1
>> Content-Type: multipart/mixed;
>> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"
>>
>> ------_=_NextPart_000_01C0B2DF.DE9D0F20

> -----
> It seems that the boundary is not corrupted and that the problem of the
> not-parsed message is not related to any bug but with the fact that the
> input mail has 2 Content-Type headers and the results depends on what
> header is considered when parsing it.

This is conversation send to James, at this time, no corruption found, the
corruption is made in the first Mailet that modify any header/mail.

> Here the problem with not converted quoted-printable corrupt even more the
> message but either way the 2 Content-Type headers is a non deterministic
> problem: do you agree?
> ----

I don't know, but there is my tests and results:

** With Mailets that set/remove a mime header **
-If manually I substitute chars>8bit for low 7bits, no problem. This works.
Javamail sets 7bits header.
-If manually I sets header Content-Transfer-Encoding with: 7bit o 8bit, This
works. Javamail don't touch the content.
-If manually I remove "Content-Type: text/plain; charset=iso-8859-1", This
works. Javamail don't touch the content.
-If manually I don't touch anything, Javamail set "Content-Transfer-Encoding
with: quoted-printable"

** Without Mailets that set/remove a mime header **
-This works in all cases. Javamail don't touch the content.

>> X-Gmail-Received: 26fbd7e0457be0aef010efa76cd5441d171d805f
>> [...]
>> Content-Transfer-Encoding: quoted-printable
>> [...]
>> Content-Type: text/plain; charset=iso-8859-1
>> Content-Type: multipart/mixed;
>> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"
>>
>> ------_=3D_NextPart_000_01C0B2DF.DE9D0F20
> -----
>
>
> I see that project glassfish started to fix a few of the bugs I reported
> against javamail: imho it worth investigating more on this as soon as they
> will release a new beta.

Agreed. :-)

Thanks.
Guillermo


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Stefano Bagnara <ap...@bago.org>.
Guillermo Grandes wrote:
> [20 comments on Jira]
> Well, In measure that I discover anything I comment these on Jira.
> 
> [Use mailing]
> Ok, but I supposed that comment in Jira was better for register of work
> done. I use Jira for track info and Mailing for oppinions.

Ok, I just wanted to keep conversations/opinions for the mailing list. 
TO be clear I'm guilty for this, also. So it was a "please" for 
everyone, including me.

> [Reject]
> Good, in some cases is better, but... In many others... the mails are
> generated by automatic systems, examples:
> 
> - James-642, missign brackets, by Oracle / Facturation Systems, nightly 
> this
> send mails with new registers, notifies facturation state's.

I already said my opinion: imho we should support this by default. But 
other committers don't agree, so we have probably to vote about this, 
and for sure this won't happen for 2.3, so there is no hurry now.
I hope that the patch temporarily works for you, in the mean time.

> - James-648, missing 7/8bit header, by HP OpenView ServiceDesk (management
> of incidences, seemed to Jira, but greater), mail arrives and now user can
> see the NextPart-boundary in the mail-reader (this is the corrupt efect,
> mail is interpreted as plain-text instead of multipart in the mail-reader).
> 
> - non-issued, also missing 7/8bits header, process of register (automatic)
> in a system of tickets for management of work orders, this send a url to
> mail: "http://pepe/register.dll?user=41223483" to confirm the sign-in, but
> the mail-reader see: "http://pepe/register.dll?usera223483" and register
> can't be completed, I suppose that the problem is like James-648 (the
> problem with this application is that the company that made the
> development... closed -bankruptcy-, We can't correct this).

Yes, they are both the same issue and it is the result of a serie of 
problems:

1. Your client is issuing 8bit chars in an HELO conversation (RFC2821 
don't allow this).

2. Javamail when have to serialize a parsed message try to understand 
wether it was 8bit or not, and if it was 8bit it try to convert it to 
quoted-printable: there is a bug that prevent this from working and make 
javamail to add the quoted-printable header and to not convert the content.

3. Once saved javamail reopen it, and it is a quoted-printable having an 
"=41" in the content so it reads it as an "a" and corrupt it.

A similar problem also exists with some email client writing 8bit chars 
in headers: Unfortunately there is not a clean way to handle this. What 
encoding should you use? How should you convert them?

> These are only comments/examples of why don't reject if another option is
> possible...

Agree, but if another "GOOD" and compliant option is possible.
Currently I don't have such an option for this problem but waiting for 
javamail to fix the bug and for us to correctly support 8bitmime.
Maybe you have this option, or maybe we can find this tomorrow or the 
next month.

> [I think that supporting a relaxed interpretation is MUCH MORE difficult]
> Yes, I know,... the life is thus.

You trucated the line. This way make no sense.
I said that supporting the relaxed intepretation was much more difficult 
than supporting 8bitmime that is an rfc spec and would have probably 
solved your problem anyway. But this was only a consideration: I don't 
have time to work on any of this issue now.

> [Sorry but I didn't understand where is currupted the mime boundary: I
> just looked at message source and it seems that the mime boundary is
> untouched. Can you tell me more?]
> 
> Yes, the message always is untouched (and is received/interpreted well by
> mail-reader) EXCEPT when you modify mail in a mailet/use:
> 
>    mail.getMessage().saveChanges();
> 
> In this moment JavaMail change headers (sets the missing header:
> Content-Transfer-Encoding: quoted-printable) and... the outbound mail 
> -seems
> good at first- is not good. My try to fix this is set missing header with
> 7bit/8bit (and work. Norman question if JAMES-638 is related. is possible?
> that affect locally-generated or modified?. I don't known)

But does it happen only when there is an 8bit char or always?

About the 8bit sender client can you confirm that your client is using 
HELO (like you reported in the attached test) *AND* *NOT* EHLO? Sorry if 
I ask again but I don't want to fix a problem I don't understand.
Furthermore I see that in the first attachment the input mail has 2 
Content-Type headers: how can we know what is the right one to use?

----
> 220 ESMTP Server
> HELO xxxxxxXX.com
...
> DATA
> 354 Ok Send data ending with <CRLF>.<CRLF>
> MIME-Version: 1.0
> Reply-To: <xxxxx>
> From: "xxxxxx" <xxxxx>
> To: <xxxxx>
> Date: Thu, 28 Sep 06 18:26:46 +0200
> Subject: xxxx #xxxx xxxx
> X-Mailer: hp OpenView service deskMail Manager 4.5
> Content-Type: text/plain; charset=iso-8859-1
> Content-Type: multipart/mixed; 
> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"
> 
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
-----

It seems that the boundary is not corrupted and that the problem of the 
not-parsed message is not related to any bug but with the fact that the 
input mail has 2 Content-Type headers and the results depends on what 
header is considered when parsing it.

Here the problem with not converted quoted-printable corrupt even more 
the message but either way the 2 Content-Type headers is a non 
deterministic problem: do you agree?

----
> X-Gmail-Received: 26fbd7e0457be0aef010efa76cd5441d171d805f
> [...]
> Content-Transfer-Encoding: quoted-printable
> [...]
> Content-Type: text/plain; charset=iso-8859-1
> Content-Type: multipart/mixed; 
> boundary="----_=_NextPart_000_01C0B2DF.DE9D0F20"
> 
> ------_=3D_NextPart_000_01C0B2DF.DE9D0F20
-----


I see that project glassfish started to fix a few of the bugs I reported 
against javamail: imho it worth investigating more on this as soon as 
they will release a new beta.

If you have time to work on this here is the link:
https://glassfish.dev.java.net/source/browse/glassfish/mail/
And here is the last commit comment (from 2 weeks ago):
-------------------
Issue number:
Cummulative changes since JavaMail 1.4:
4107594 IMAP implementation should use the IDLE extension if available
6423701 Problem with using OrTerm when the protocol is IMAP
6431207 SMTP is adding extra CRLF to message content
6447295 IMAPMessage fails to return Content-Language from bodystructure
6447799 encoded text not decoded even when mail.mime.decodetext.strict 
is false
6447801 MimeBodyPart.writeTo reencodes data unnecessarily
6456422 NullPointerException in smtptransport when sending MimeMessages
         with no encoding
6456444 MimeMessages created from stream are not correctly handled
         with allow8bitmime
<no id> fix performance bug in base64 encoder; now even faster!
<no id> throw MessageRemovedException from getContent for IMAP messages
<no id> MimeUtility.decodeText should not discard trailing whitespace
<no id> SSLSocketFactory should be used for imap and smtp STARTTLS commands
<no id> added mail.<prot>.ssl.protocols and mail.<prot>.ssl.ciphersuites 
props

Obtained from: JavaMail 1.4.1ea
-------------------------

6447801 and 6456444 may both be related to what we are talking about.
Not sure if this sources are the same of 1.4.1ea (like the comment say) 
or not.

Stefano


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Guillermo Grandes <gu...@gmail.com>.
[20 comments on Jira]
Well, In measure that I discover anything I comment these on Jira.

[Use mailing]
Ok, but I supposed that comment in Jira was better for register of work
done. I use Jira for track info and Mailing for oppinions.

[Reject]
Good, in some cases is better, but... In many others... the mails are
generated by automatic systems, examples:

- James-642, missign brackets, by Oracle / Facturation Systems, nightly this
send mails with new registers, notifies facturation state's.

- James-648, missing 7/8bit header, by HP OpenView ServiceDesk (management
of incidences, seemed to Jira, but greater), mail arrives and now user can
see the NextPart-boundary in the mail-reader (this is the corrupt efect,
mail is interpreted as plain-text instead of multipart in the mail-reader).

- non-issued, also missing 7/8bits header, process of register (automatic)
in a system of tickets for management of work orders, this send a url to
mail: "http://pepe/register.dll?user=41223483" to confirm the sign-in, but
the mail-reader see: "http://pepe/register.dll?usera223483" and register
can't be completed, I suppose that the problem is like James-648 (the
problem with this application is that the company that made the
development... closed -bankruptcy-, We can't correct this).

These are only comments/examples of why don't reject if another option is
possible...

[I think that supporting a relaxed interpretation is MUCH MORE difficult]
Yes, I know,... the life is thus.

[Sorry but I didn't understand where is currupted the mime boundary: I
just looked at message source and it seems that the mime boundary is
untouched. Can you tell me more?]

Yes, the message always is untouched (and is received/interpreted well by
mail-reader) EXCEPT when you modify mail in a mailet/use:

    mail.getMessage().saveChanges();

In this moment JavaMail change headers (sets the missing header:
Content-Transfer-Encoding: quoted-printable) and... the outbound mail -seems
good at first- is not good. My try to fix this is set missing header with
7bit/8bit (and work. Norman question if JAMES-638 is related. is possible?
that affect locally-generated or modified?. I don't known)

[Test, More Info, etc]
Attach trace & received raw-mail. do you need any more? (list of
Santa-Claus) :-)

With the rest of which you have been to me commenting in your others mails I
agree with you.

Thanks,
--- Guillermo

----- Original Message ----- 
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Developers List" <se...@james.apache.org>
Sent: Wednesday, October 04, 2006 9:57 AM
Subject: Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit
in body


> Guillermo Grandes (JIRA) wrote:
>>     [ http://issues.apache.org/jira/browse/JAMES-648?page=all ]


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Stefano Bagnara <ap...@bago.org>.
Guillermo Grandes (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439680 ] 
>             
> Guillermo Grandes commented on JAMES-648:
> -----------------------------------------
> 
> Anyway... My big problem is not the "ó" corrupted in an "ó", my problem is the corrupted Mime Boundary "------_=_NextPart_000_01C0B2DF.DE9D0F20"
> 
> IMHO... this is not... "normal"
> 
> if I add the missing header "Content-Transfer-Encoding: 7bit" or "8bit", the mime-boundaries are OK and message is not corrupt, this is my question, why JavaMail use "quoted-printable" for missing header instead of Xbit?
> IMO, if a char >127 is found in the stream and no header is set, we have 2 options:
> 1) recode the chars with =HH and set quoted-printable
> 2) set header to 8bit
> 
> this is the correct, right?


I think that you wrote 20 messages in this JIRA issue and I still don't 
understand what exactly happens.

In this message you talk about an "ó" corrupted in an "ó": I had not 
seen this explanation in any previous log/attachment/comment. Can you 
write a single message where you write the SMTP conversation in input, 
any middle passage you can trace/log and the result?

I would like to understand if my idea that your client is talking to 
JAMES like it exposed the 8BITMIME extension is right or not and if 
having an 8bitmime support would be or not the solution to your issue.

As an example I don't know if "your" (non-rfc-compliant) client is using 
HELO or EHLO as the salutation in the SMTP conversation.

And please use the mailing list for this and not JIRA: we have not 
threads in JIRA and it will be a mess if we have 100 unthreaded messages 
there. As soon as the scenario will be more clear you (or we) can add 
the result of the discussion to the issue.

Stefano

PS: I will be against applying any code change or patch based on 
assumptions and not on a clear analysis of what happened when we talk 
about relaxed interpretation of the rfc.


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


Re: [jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by Stefano Bagnara <ap...@bago.org>.
Guillermo Grandes (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439680 ] 
>             
> Guillermo Grandes commented on JAMES-648:
> -----------------------------------------
> 
> Anyway... My big problem is not the "ó" corrupted in an "ó", my problem is the corrupted Mime Boundary "------_=_NextPart_000_01C0B2DF.DE9D0F20"
> 
> IMHO... this is not... "normal"
> 
> if I add the missing header "Content-Transfer-Encoding: 7bit" or "8bit", the mime-boundaries are OK and message is not corrupt, this is my question, why JavaMail use "quoted-printable" for missing header instead of Xbit?
> IMO, if a char >127 is found in the stream and no header is set, we have 2 options:
> 1) recode the chars with =HH and set quoted-printable
> 2) set header to 8bit
> 
> this is the correct, right?

Sorry but I didn't understand where is currupted the mime boundary: I 
just looked at message source and it seems that the mime boundary is 
untouched. Can you tell me more?

Btw, I read all of your story but you are concentrated on a non-issue: 
the problem is that most other mail servers support 8bitmime while we 
don't: if we correctly supported 8bitmime your message would probably pass.

Now we should probably reject it: I think this is what most non-8bitmime 
servers did in past (now there are really few of them around).

So IMHO the solution is make 8bitmime to work in an RFC compliant way: 
and I bet this will solve your issue. Otherwise you don't have enough 
information to deal with the corrupted incoming message without 
corrupting it even more.

I worked a lot to make 8bitmime working in 2.3.0 but we had to 
disable/revert my changes because I found a lot of bugs in javamail that 
prevented us to work safely with 8bit data. I still am the assignee of 
the 8bitmime support issue (JAMES-52) but I cannot invest more time on 
it until javamail will fix blocking issues.
https://issues.apache.org/jira/browse/JAMES-52?page=all

Please consider that I'm not against relaxed interpretation of the RFC 
(and you can read my opinion on the bracket thing, or any other topic in 
past) but I think that supporting a relaxed interpretation is MUCH MORE 
difficult and HAVE TO BE carefully designed to be sure you don't 
introduce more problems than you solve them and I think that if you 
start reading non-7bit data without even to decide what charset to use 
to read that 8bit char or anything similar you already decided to 
corrupt the message and you are only lucky if this does not happen.

Btw, can you tell me what is the client that generate such a message 
(8bit content sent to a non 8bitmime server and not specifying the 
content-transfer-encoding)?

Stefano



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


[jira] Commented: (JAMES-648) Corrupted MIME message with 8bit in body

Posted by "Guillermo Grandes (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-648?page=comments#action_12439680 ] 
            
Guillermo Grandes commented on JAMES-648:
-----------------------------------------

Anyway... My big problem is not the "ó" corrupted in an "ó", my problem is the corrupted Mime Boundary "------_=_NextPart_000_01C0B2DF.DE9D0F20"

IMHO... this is not... "normal"

if I add the missing header "Content-Transfer-Encoding: 7bit" or "8bit", the mime-boundaries are OK and message is not corrupt, this is my question, why JavaMail use "quoted-printable" for missing header instead of Xbit?
IMO, if a char >127 is found in the stream and no header is set, we have 2 options:
1) recode the chars with =HH and set quoted-printable
2) set header to 8bit

this is the correct, right?



> Corrupted MIME message with 8bit in body
> ----------------------------------------
>
>                 Key: JAMES-648
>                 URL: http://issues.apache.org/jira/browse/JAMES-648
>             Project: James
>          Issue Type: Bug
>    Affects Versions: Trunk
>         Environment: James 3.0
>            Reporter: Guillermo Grandes
>         Assigned To: Norman Maurer
>         Attachments: 4D61696C313135393436303732323938332D323834.Repository.FileStreamStore, james-proccesors.xml, traces.txt
>
>
> My config: Client (Mail-Orig) -> James (relay) -> Exchange -> Outlook (Reader)
> This is the mail received from an HP-Openview ServiceDesk (Mail-Orig) to James and relayed to Exchange:
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- begin
> ------_=_NextPart_000_01C0B2DF.DE9D0F20
> Creada por: Explotación
> Archivo Adjunto?: No
> ------_=_NextPart_000_01C0B2DF.DE9D0F20--
> ----------- cut ----------- cut ----------- cut ----------- cut ----------- end
> (they would not have to appear the NextPart headers)

-- 
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