Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

need help with UTF-8 in Subject: header

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


dpryadko at hc

Jun 17, 2008, 9:23 AM

Post #1 of 3 (1962 views)
Permalink
need help with UTF-8 in Subject: header

Hi.

I have a problem with bounces.

Here's an example of 'bounced' message original Subject:

Subject: Re: =?UTF-8?Q?[=D0=97=D0=B0=D1=8F=D0=B2=D0=BA=D0=B0:2008061010026081]_?=
=?UTF-8?Q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0_?=
=?UTF-8?Q?=D0=B4=D0=BE=D1=81=D1=82=D0=B0=D0=B2=D0=BA=D0=B8_?=
=?UTF-8?Q?=D1=8D=D0=BB=D0=B5=D0=BA=D1=82=D1=80=D0=BE=D0=BD=D0=BD=D0=BE=D0=B9_?=
=?UTF-8?Q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D1=81=D0=BF=D0=BE=D0=BD=D0=B4=D0=B5=D0=BD=D1=86=D0=B8=D0=B8._?=

As you can see, it has "UTF-8" in each line.

And this is the subject of bounce message:
Subject: Re: [Заявка:2008061010026081] Проверка доставки
=?UTF-8?Q?=D1=8D=D0=BB=D0=B5=D0=BA=D1=82=D1=80=D0=BE=D0=BD=D0=BD=D0=BE=D0=B9_?=
=?UTF-8?Q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D1=81=D0=BF=D0=BE=D0=BD=D0=B4=D0=B5=D0=BD=D1=86=D0=B8=D0=B8._?=
Mail delivery failed : returning message to sender

So it missed "UTF-8" at first line and became unreadable.

Here is beginning of my bounce message file:
Subject: $header_subject Mail delivery failed ${if
eq{$sender_address}{$bounce_recipient}{: returning message to sender}}
****


--
Dmitry Pryadko
http://www.hc.ru
Attachments: smime.p7s (3.15 KB)


exim-users at spodhuis

Jun 17, 2008, 3:45 PM

Post #2 of 3 (1898 views)
Permalink
Re: need help with UTF-8 in Subject: header [In reply to]

On 2008-06-17 at 20:23 +0400, Dmitry Pryadko wrote:
> I have a problem with bounces.
>
> Here's an example of 'bounced' message original Subject:
>
> Subject: Re: =?UTF-8?Q?[=D0=97=D0=B0=D1=8F=D0=B2=D0=BA=D0=B0:2008061010026081]_?=
> =?UTF-8?Q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0_?=
> =?UTF-8?Q?=D0=B4=D0=BE=D1=81=D1=82=D0=B0=D0=B2=D0=BA=D0=B8_?=
> =?UTF-8?Q?=D1=8D=D0=BB=D0=B5=D0=BA=D1=82=D1=80=D0=BE=D0=BD=D0=BD=D0=BE=D0=B9_?=
> =?UTF-8?Q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D1=81=D0=BF=D0=BE=D0=BD=D0=B4=D0=B5=D0=BD=D1=86=D0=B8=D0=B8._?=

Exim is being very carefully adherent to the MIME specification in
RFC2047 which places a maximum length on each encoded-word.

----------------------------8< cut here >8------------------------------
encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
[...]
An 'encoded-word' may not be more than 75 characters long, including
'charset', 'encoding', 'encoded-text', and delimiters. If it is
desirable to encode more text than will fit in an 'encoded-word' of
75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may
be used.
----------------------------8< cut here >8------------------------------

So the MIME decoder is skipping those long strings and adding them
literally.

Is the original text spam? (Sorry, I don't read Russian). If not, then
those are broken mail-clients. The question then is what should be done
about it.

If you set "check_rfc2047_length" false in Exim's main configuration,
the header will be decoded correctly; I would assume (but haven't
checked) that Exim would then re-encode things correctly as needed.

check_rfc2047_length = false

-Phil

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


dpryadko at hc

Jun 18, 2008, 12:03 AM

Post #3 of 3 (1892 views)
Permalink
Re: need help with UTF-8 in Subject: header [In reply to]

Phil Pennock пишет:
> On 2008-06-17 at 20:23 +0400, Dmitry Pryadko wrote:
>
>> I have a problem with bounces.
>>
>> Here's an example of 'bounced' message original Subject:
>>
>> Subject: Re: =?UTF-8?Q?[=D0=97=D0=B0=D1=8F=D0=B2=D0=BA=D0=B0:2008061010026081]_?=
>> =?UTF-8?Q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0_?=
>> =?UTF-8?Q?=D0=B4=D0=BE=D1=81=D1=82=D0=B0=D0=B2=D0=BA=D0=B8_?=
>> =?UTF-8?Q?=D1=8D=D0=BB=D0=B5=D0=BA=D1=82=D1=80=D0=BE=D0=BD=D0=BD=D0=BE=D0=B9_?=
>> =?UTF-8?Q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D1=81=D0=BF=D0=BE=D0=BD=D0=B4=D0=B5=D0=BD=D1=86=D0=B8=D0=B8._?=
>
> If you set "check_rfc2047_length" false in Exim's main configuration,
> the header will be decoded correctly; I would assume (but haven't
> checked) that Exim would then re-encode things correctly as needed.
>
> check_rfc2047_length = false
>
>
>
thanks ! setting that single option didn't help, but it worked when
corrected bounce message template in the following way:

Subject: ${rfc2047:$header_subject Mail delivery failed ${if
eq{$sender_address}{$bounce_recipient}{: returning message to sender}}}

--
Dmitry Pryadko
http://www.hc.ru
Attachments: smime.p7s (3.15 KB)

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.