james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: [mime4j] null charset error
Date Mon, 23 Apr 2007 12:12:51 GMT
BTW, I added your code because it makes sense anyway ;-)

thx!

Norman Maurer schrieb:
> Hi,
>
> For me it seems that the message is a multipart/alernative and missing
> the  "Content-Type: text/plain; charset=anychar".
> If im not wrong this is not a valid mimemessage. I don't hat else we
> could do with such messages. Maybe just use an "default" charset of 
> "iso-8859-1"?
>
> bye
> Norman
> GX GLIX schrieb:
>   
>> Thanks all for such a fast response.
>>
>> attached is an example that should replicate the error.
>>
>> file permissions etc are correct as binary attachments are saved fine
>> and other text attachments have worked fine.
>>
>> Thanks for such a prompt response
>>
>> GX
>>
>>
>>     
>>> From: Niklas Therning <niklas@trillian.se>
>>> Reply-To: "James Developers List" <server-dev@james.apache.org>
>>> To: James Developers List <server-dev@james.apache.org>
>>> Subject: Re: [mime4j] null charset error
>>> Date: Mon, 23 Apr 2007 13:28:36 +0200
>>>
>>> Yes, if possible please post the source of the message you are parsing.
>>> That will help us fix the first problem.
>>>
>>> Also, make sure you don't close() the OutputStream you are writing to
>>> before your call to Message.writeTo().
>>>
>>> /Niklas
>>>
>>> Norman Maurer wrote:
>>>       
>>>> Can you show use the emailcontent ?
>>>>
>>>>
>>>> bye
>>>> Norman
>>>>
>>>> GX GLIX schrieb:
>>>>
>>>>         
>>>>> Hi All
>>>>>
>>>>> I am getting a "Null charset name" error during parsing, it seems
>>>>>           
>>> that
>>>       
>>>>> getCharset(String charsetName) is passed an empty string... I tried
>>>>> the following hack to fix it:
>>>>>
>>>>> ..........
>>>>>    public static java.nio.charset.Charset getCharset(String
>>>>> charsetName) {
>>>>>        if(charsetName == null)
>>>>>            charsetName = "ISO8859-1";
>>>>>        java.nio.charset.Charset c =
>>>>> java.nio.charset.Charset.forName(charsetName);
>>>>> ............
>>>>>
>>>>> now the result is :
>>>>>
>>>>> java.io.IOException: Bad file descriptor
>>>>>     at java.io.FileOutputStream.writeBytes(Native Method)
>>>>>     at java.io.FileOutputStream.write(FileOutputStream.java:260)
>>>>>     at
>>>>> sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
>>>>>     at
>>>>>
>>>>>           
>>> sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
>>>
>>>       
>>>>>     at
>>>>> sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
>>>>>     at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
>>>>>     at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
>>>>>     at java.io.BufferedWriter.flush(BufferedWriter.java:230)
>>>>>     at org.mime4j.message.Header.writeTo(Header.java:152)
>>>>>     at org.mime4j.message.BodyPart.writeTo(BodyPart.java:39)
>>>>>     at org.mime4j.message.Multipart.writeTo(Multipart.java:178)
>>>>>     at org.mime4j.message.Message.writeTo(Message.java:91)
>>>>> any ideas anyone?
>>>>>
>>>>> _________________________________________________________________
>>>>> FREE pop-up blocking with the new MSN Toolbar - get it now!
>>>>> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>>
>>>>         
>>> -- 
>>> Niklas Therning
>>> www.spamdrain.net
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-dev-help@james.apache.org
>>>
>>>       
>> _________________________________________________________________
>> Don't just search. Find. Check out the new MSN Search!
>> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> Betreff:
>> Undelivered Mail Returned to Sender
>> Von:
>> MAILER-DAEMON@cytanet.com.cy (Mail Delivery System)
>> Datum:
>> Mon, 23 Apr 2007 14:30:24 +0300 (EEST)
>> An:
>> bscrm-acon@netquest.com.cy
>>
>> An:
>> bscrm-acon@netquest.com.cy
>>
>> Return-path:
>> <>
>> X-Spam-Checker-Version:
>> SpamAssassin 3.1.0 (2005-09-13) on NETQUEST.netquest.com.cy
>> X-Spam-Level:
>> ***********
>> X-Spam-Status:
>> No, score=11.7 required=20.0 tests=BAYES_99,HTML_90_100,
>> HTML_MESSAGE,HTML_SHORT_LENGTH autolearn=disabled version=3.1.0
>> Authentication-Results:
>> netquest.com.cy smtp.mail=; spf=neutral
>> Authentication-Results:
>> netquest.com.cy header.from=; domainkeys=neutral (not signed);
>> dkim=neutral (not signed)
>> X-MDDK-Result:
>> neutral (netquest.com.cy)
>> X-MDDKIM-Result:
>> neutral (netquest.com.cy)
>> X-MDSPF-Result:
>> none (netquest.com.cy)
>> Received-SPF:
>> none (netquest.com.cy: does not designate permitted sender hosts)
>> x-spf-client=MDaemon.PRO.v9.0.0 receiver=netquest.com.cy
>> client-ip=195.14.130.226 envelope-from=<> helo=demokritos2.cytanet.com.cy
>> Received:
>> from demokritos2.cytanet.com.cy ([195.14.130.226]) by netquest.com.cy
>> (netquest.com.cy [195.14.149.40]) (MDaemon PRO v9.0.0) with ESMTP id
>> md50000532993.msg for <bscrm-acon@netquest.com.cy>; Mon, 23 Apr 2007
>> 14:25:07 +0300
>> Received:
>> by demokritos2.cytanet.com.cy (Postfix) id 9FB5C480F1; Mon, 23 Apr
>> 2007 14:30:24 +0300 (EEST)
>> Auto-Submitted:
>> auto-replied
>> MIME-Version:
>> 1.0
>> Content-Type:
>> multipart/report; report-type=delivery-status;
>> boundary="6673E480EC.1177327824/demokritos2.cytanet.com.cy"
>> Nachricht-ID:
>> <20070423113024.9FB5C480F1@demokritos2.cytanet.com.cy>
>> X-MDRcpt-To:
>> bscrm-acon@netquest.com.cy
>> X-Rcpt-To:
>> bscrm-acon@netquest.com.cy
>> X-MDRemoteIP:
>> 195.14.130.226
>> X-MDaemon-Deliver-To:
>> bscrm-acon@netquest.com.cy
>> X-Spam-Processed:
>> netquest.com.cy, Mon, 23 Apr 2007 14:25:07 +0300
>> X-MDAV-Processed:
>> netquest.com.cy, Mon, 23 Apr 2007 14:25:11 +0300
>> Content-Transfer-Encoding:
>> 7bit
>>
>>
>> This is the mail system at host demokritos2.cytanet.com.cy.
>>
>> I'm sorry to have to inform you that your message could not
>> be delivered to one or more recipients. It's attached below.
>>
>> For further assistance, please send mail to postmaster.
>>
>> If you do so, please include this problem report. You can
>> delete your own text from the attached returned message.
>>
>>                    The mail system
>>
>> <12131test@angelos123test.com>: Host or domain name not found. Name service
>>     error for name=angelos123test.com type=A: Host not found
>>
>>
>> !DSPAM:1,462c9cbf324321555613041!
>>   
>> ------------------------------------------------------------------------
>>
>> Reporting-MTA: dns; demokritos2.cytanet.com.cy
>> X-Postfix-Queue-ID: 6673E480EC
>> X-Postfix-Sender: rfc822; bscrm-acon@netquest.com.cy
>> Arrival-Date: Mon, 23 Apr 2007 14:30:24 +0300 (EEST)
>>
>> Final-Recipient: rfc822; 12131test@angelos123test.com
>> Original-Recipient: rfc822;12131test@angelos123test.com
>> Action: failed
>> Status: 5.4.4
>> Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error
>>     for name=angelos123test.com type=A: Host not found
>>   
>>
>> ------------------------------------------------------------------------
>>
>> Betreff:
>> Von:
>> "Buysell CRM test account acon" <bscrm-acon@netquest.com.cy>
>> Datum:
>> Mon, 23 Apr 2007 14:24:37 +0300
>> An:
>> 12131test@angelos123test.com
>>
>> An:
>> 12131test@angelos123test.com
>>
>> X-Virus-Scanned:
>> By virus scanner at Cytanet
>> Received:
>> from netquest.com.cy (mail.netquest.com.cy [195.14.149.40]) by
>> demokritos2.cytanet.com.cy (Postfix) with ESMTP id 5979A480E9 for
>> <12131test@angelos123test.com>; Mon, 23 Apr 2007 14:30:22 +0300 (EEST)
>> Received:
>> from WorldClient by netquest.com.cy (MDaemon PRO v9.0.0) with ESMTP id
>> md50000532992.msg for <12131test@angelos123test.com>; Mon, 23 Apr 2007
>> 14:24:37 +0300
>> Received:
>> from [91.184.194.210] by netquest.com.cy via WorldClient with HTTP;
>> Mon, 23 Apr 2007 14:24:37 +0300
>> MIME-Version:
>> 1.0
>> Content-Type:
>> multipart/alternative; boundary="_0423-1424-37-PART-BREAK"
>> Nachricht-ID:
>> <WorldClient-F200704231424.AA24370002@netquest.com.cy>
>> X-Mailer:
>> WorldClient 9.0.0
>> X-Authenticated-Sender:
>> bscrm-acon@netquest.com.cy
>> X-Spam-Processed:
>> netquest.com.cy, Mon, 23 Apr 2007 14:24:37 +0300 (not processed:
>> message from valid local sender)
>> X-MDRemoteIP:
>> 127.0.0.1
>> X-Return-Path:
>> bscrm-acon@netquest.com.cy
>> X-MDaemon-Deliver-To:
>> 12131test@angelos123test.com
>> X-MDAV-Processed:
>> netquest.com.cy, Mon, 23 Apr 2007 14:24:37 +0300
>>
>>
>> test
>>  
>>  
>> !DSPAM:1,462c9cbf324321555613041!
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>> !DSPAM:1,462c9cbf324321555613041!
>>   
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>
> !DSPAM:1,462c9f9c324323051214747!
>
>
>   


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


Mime
View raw message