Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have set up Postfix on my CentOS server.

If the subject of the email contains some non-English characters (i.e.: accented letters), it gets ruined.

Here is an example.

Original subject:

this is a testà è ciao

Subject, once delivered to the server:
=?ISO-8859-1?Q?this_is_a_test=E0_=E8_ciao?=

I know it is now an issue with MUAs because: _ A lot of users have reported the issue - thus the MUA of the sender is out of the equation
_ I check the raw email on the server (I access the actual file with VI)

I guess it is a problem with charset, but I can't find anywhere in the Postfix config files how to handle the charset.

Thanks,
Dan

share|improve this question
add comment

1 Answer

Actually, Postfix seems to do what it should do, according to RFC2047: Message Header Extensions for Non-ASCII Text. In the body you can have 8-bit data, but I believe that headers are universally agreed to use only 7-bit data.

Testing the conversion with some sample python suggests that the header is transformed correctly:

>>> import email.header as eh
>>> r= eh.decode_header('=?ISO-8859-1?Q?this_is_a_test=E0_=E8_ciao?=')
>>> print r
[('this is a test\xe0 \xe8 ciao', 'iso-8859-1')]
>>> print r[0][0].decode(r[0][1])
this is a testà è ciao

As Mark Henderson gently hinted in a comment, I didn't try to be thorough about the reasons for your problem. So: it is possible that the end user mail client does not transform back the subject line. Can you provide us with the raw header from the message? You can see that by viewing the “message source” in Thunderbird (typically Ctrl+U), as an example.

share|improve this answer
    
Does this then mean it's a problem with the mail receiver/client not translating the subject line? –  Mark Henderson Apr 29 '11 at 22:25
    
@Mark: I would suggest this, yes. We need to see the raw header from the message, to be sure. –  ΤΖΩΤΖΙΟΥ Apr 30 '11 at 6:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.