You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Norman Maurer <nm...@spam-box.de> on 2006/03/08 13:36:46 UTC
Transfer encoding behavior
Hi,
is it a normal behavior of james to change the
Content-Transfer-Encoding when adding headers with mailets ? I just
notice that after i get some strange emails which get processed with a
perl script that replace ä with ae for example...
After adding headers:
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=iso-8859-15
MIME-Version: 1.0
Without adding headers:
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
bye
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Transfer encoding behavior
Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Hi,
>
> is it a normal behavior of james to change the
> Content-Transfer-Encoding when adding headers with mailets ? I just
> notice that after i get some strange emails which get processed with a
> perl script that replace ä with ae for example...
What mailet? AddHeader? What header are you adding?
Configuration? James version?
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Transfer encoding behavior
Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Mailet:
> AddHeader
>
> Headers to add:
> X-User: nm@spam-box.de
> X-Domain: spam-box.de
>
> config:
> no special config
>
> version:
> latest trunk
I cannot reproduce it.
Does it happen with ALL the messages or with specific messages?
All James does in AddHeader is:
--------
MimeMessage message = mail.getMessage () ;
message.setHeader(headerName, headerValue);
message.saveChanges();
--------
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Transfer encoding behavior
Posted by Stefano Bagnara <ap...@bago.org>.
So the one that passed the AddHeader is right and the one with no
AddHeader is wrong??
Can you confirm it? (it's weird)
Stefano
Norman Maurer wrote:
> I can reproduce that by do that:
>
> command:
> maurer@debbox:~$ mail -s "01632983002" nm@spam-box.de
> Ich bin der Bär!
> .
> Cc:
> maurer@debbox:~$
>
> config:
>
> <mailet match="RecipientIs=nm@spam-box.de"
> class="AddHeader">
> <name>X-MailetHeader</name>
> <value>test@test.de</value>
> </mailet>
>
> <mailet match="RecipientIs=nm@spam-box.de" class="ToProcessor">
> <processor>transport</processor>
> </mailet>
>
> email:
> X-MailetHeader: test@test.de
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/plain; charset=iso-8859-15
> MIME-Version: 1.0
> Message-ID: <57...@devcenter>
>
>
>
> Ich bin der Bär!
>
>
>
>
>
> command:
> maurer@debbox:~$ mail -s "01632983002" nm@spam-box.de
> Ich bin der Bär!
> .
> Cc:
> maurer@debbox:~$
>
> config:
>
> <mailet match="RecipientIs=nm@spam-box.de" class="ToProcessor">
> <processor>transport</processor>
> </mailet>
>
>
> email:
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset=us-ascii
> MIME-Version: 1.0
> Message-ID: <98...@devcenter>
> X-Evolution-Source: imap://nm%40byteaction.de@bamail.byteaction.de/
>
>
> Ich bin der Br!
>
>
>
>
> I also notice that the "ä" is not in the second email.. its just gone..
>
> maybe that helps
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Transfer encoding behavior
Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Seems so.. without the Addheader the ä ist gone ?!?!
>
> ITs really strange . isnt it ?
Ok, I found the problem. We miss to call a "saveChanges" on the message
before sending it to the remoteDelivery, but we fix its headers if the
remote server does not support 8bitmime (maybe this is your scenario).
Furthermore, the mail command you use, does not support non 7bit
messages. In fact it does not add any header about message encoding
while sending 8bit content. This is not a correct thing, but if you
submit the message to the AddHeader it is parsed by javamail that
understand it is not 7bit content and convert it to your system default
(iso-8859-15) and save it.
I reopened the 8bitmime issue (again) because we should handle this
"unlikely" scenario too.
Hope to commmit a patch soon.
>>> command:
>>> maurer@debbox:~$ mail -s "01632983002" nm@spam-box.de
>>> Ich bin der Bär!
>>> .
>>> Cc:
>>> maurer@debbox:~$
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Transfer encoding behavior
Posted by Norman Maurer <nm...@spam-box.de>.
Txh for the feedback :-)
That could be the problem . Nice to hear that im not lost with that ..
bye
Am Freitag, den 10.03.2006, 18:31 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Seems so.. without the Addheader the ä ist gone ?!?!
> >
> > ITs really strange . isnt it ?
>
> Ok, I found the problem. We miss to call a "saveChanges" on the message
> before sending it to the remoteDelivery, but we fix its headers if the
> remote server does not support 8bitmime (maybe this is your scenario).
>
> Furthermore, the mail command you use, does not support non 7bit
> messages. In fact it does not add any header about message encoding
> while sending 8bit content. This is not a correct thing, but if you
> submit the message to the AddHeader it is parsed by javamail that
> understand it is not 7bit content and convert it to your system default
> (iso-8859-15) and save it.
>
> I reopened the 8bitmime issue (again) because we should handle this
> "unlikely" scenario too.
>
> Hope to commmit a patch soon.
>
> >>> command:
> >>> maurer@debbox:~$ mail -s "01632983002" nm@spam-box.de
> >>> Ich bin der Bär!
> >>> .
> >>> Cc:
> >>> maurer@debbox:~$
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
> !EXCUBATOR:2,4411b872278978638184376!
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Transfer encoding behavior
Posted by Norman Maurer <nm...@spam-box.de>.
Seems so.. without the Addheader the ä ist gone ?!?!
ITs really strange . isnt it ?
bye
Am Mittwoch, den 08.03.2006, 16:55 +0100 schrieb Stefano Bagnara:
> So the one that passed the AddHeader is right and the one with no
> AddHeader is wrong??
>
> Can you confirm it? (it's weird)
>
> Stefano
>
> Norman Maurer wrote:
> > I can reproduce that by do that:
> >
> > command:
> > maurer@debbox:~$ mail -s "01632983002" nm@spam-box.de
> > Ich bin der Bär!
> > .
> > Cc:
> > maurer@debbox:~$
> >
> > config:
> >
> > <mailet match="RecipientIs=nm@spam-box.de"
> > class="AddHeader">
> > <name>X-MailetHeader</name>
> > <value>test@test.de</value>
> > </mailet>
> >
> > <mailet match="RecipientIs=nm@spam-box.de" class="ToProcessor">
> > <processor>transport</processor>
> > </mailet>
> >
> > email:
> > X-MailetHeader: test@test.de
> > Content-Transfer-Encoding: quoted-printable
> > Content-Type: text/plain; charset=iso-8859-15
> > MIME-Version: 1.0
> > Message-ID: <57...@devcenter>
> >
> >
> >
> > Ich bin der Bär!
> >
> >
> >
> >
> >
> > command:
> > maurer@debbox:~$ mail -s "01632983002" nm@spam-box.de
> > Ich bin der Bär!
> > .
> > Cc:
> > maurer@debbox:~$
> >
> > config:
> >
> > <mailet match="RecipientIs=nm@spam-box.de" class="ToProcessor">
> > <processor>transport</processor>
> > </mailet>
> >
> >
> > email:
> > Content-Transfer-Encoding: 7bit
> > Content-Type: text/plain; charset=us-ascii
> > MIME-Version: 1.0
> > Message-ID: <98...@devcenter>
> > X-Evolution-Source: imap://nm%40byteaction.de@bamail.byteaction.de/
> >
> >
> > Ich bin der Br!
> >
> >
> >
> >
> > I also notice that the "ä" is not in the second email.. its just gone..
> >
> > maybe that helps
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
> !EXCUBATOR:2,440efef2277902047081529!
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Transfer encoding behavior
Posted by Norman Maurer <nm...@spam-box.de>.
I can reproduce that by do that:
command:
maurer@debbox:~$ mail -s "01632983002" nm@spam-box.de
Ich bin der Bär!
.
Cc:
maurer@debbox:~$
config:
<mailet match="RecipientIs=nm@spam-box.de"
class="AddHeader">
<name>X-MailetHeader</name>
<value>test@test.de</value>
</mailet>
<mailet match="RecipientIs=nm@spam-box.de" class="ToProcessor">
<processor>transport</processor>
</mailet>
email:
X-MailetHeader: test@test.de
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=iso-8859-15
MIME-Version: 1.0
Message-ID: <57...@devcenter>
Ich bin der Bär!
command:
maurer@debbox:~$ mail -s "01632983002" nm@spam-box.de
Ich bin der Bär!
.
Cc:
maurer@debbox:~$
config:
<mailet match="RecipientIs=nm@spam-box.de" class="ToProcessor">
<processor>transport</processor>
</mailet>
email:
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Message-ID: <98...@devcenter>
X-Evolution-Source: imap://nm%40byteaction.de@bamail.byteaction.de/
Ich bin der Br!
I also notice that the "ä" is not in the second email.. its just gone..
maybe that helps
Am Mittwoch, den 08.03.2006, 15:52 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Mailet:
> > AddHeader
> >
> > Headers to add:
> > X-User: nm@spam-box.de
> > X-Domain: spam-box.de
> >
> > config:
> > no special config
> >
> > version:
> > latest trunk
>
>
> I cannot reproduce it.
> Does it happen with ALL the messages or with specific messages?
>
> All James does in AddHeader is:
> --------
> MimeMessage message = mail.getMessage () ;
> message.setHeader(headerName, headerValue);
> message.saveChanges();
> --------
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
> !EXCUBATOR:2,440ef01b169501835694699!
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Transfer encoding behavior
Posted by Norman Maurer <nm...@spam-box.de>.
Mailet:
AddHeader
Headers to add:
X-User: nm@spam-box.de
X-Domain: spam-box.de
config:
no special config
version:
latest trunk
bye
Norman
Am Mittwoch, den 08.03.2006, 14:26 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Hi,
> >
> > is it a normal behavior of james to change the
> > Content-Transfer-Encoding when adding headers with mailets ? I just
> > notice that after i get some strange emails which get processed with a
> > perl script that replace ä with ae for example...
>
> What mailet? AddHeader? What header are you adding?
> Configuration? James version?
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
> !EXCUBATOR:2,440edbf827561995719393!
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org