haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.02k stars 662 forks source link

Charset conversion not working #902

Closed visualjeff closed 9 years ago

visualjeff commented 9 years ago

I'm using version 2.6.1 and I send in the following French using swaks (the command is below message):

Maître Corbeau, sur un arbre perché, Tenait en son bec un fromage. Maître Renard, par l'odeur alléché, Lui tint à peu près ce langage : « Hé ! bonjour, Monsieur du Corbeau. Que vous êtes joli ! que vous me semblez beau ! Sans mentir, si votre ramage Se rapporte à votre plumage, Vous êtes le Phénix des hôtes de ces bois. » A ces mots le Corbeau ne se sent pas de joie ; Et pour montrer sa belle voix, Il ouvre un large bec, laisse tomber sa proie. Le Renard s'en saisit, et dit : « Mon bon Monsieur, Apprenez que tout flatteur Vit aux dépens de celui qui l'écoute : Cette leçon vaut bien un fromage, sans doute. » Le Corbeau, honteux et confus, Jura, mais un peu tard, qu'on ne l'y prendrait plus.

swaks --body french.txt --add-header "MIME-Version: 1.0" --add-header "Content-Type: text/html;charset=iso-8859-2" --to aatel@cosco.com -s xxxxx.cloudapp.net -p 25

I thought haraka would convert the message body from iso-8859-2 to UTF-8. Am I incorrect?

Thanks,

Jeff

baudehlo commented 9 years ago

The conversion only happens in the bodytext in the API. It doesn't convert in the queued mail.

On Mar 31, 2015, at 7:28 PM, Jeff notifications@github.com wrote:

I'm using version 2.6.1 and I send in the following French using swaks (the command is below message):

Maître Corbeau, sur un arbre perché, Tenait en son bec un fromage. Maître Renard, par l'odeur alléché, Lui tint à peu près ce langage : « Hé ! bonjour, Monsieur du Corbeau. Que vous êtes joli ! que vous me semblez beau ! Sans mentir, si votre ramage Se rapporte à votre plumage, Vous êtes le Phénix des hôtes de ces bois. » A ces mots le Corbeau ne se sent pas de joie ; Et pour montrer sa belle voix, Il ouvre un large bec, laisse tomber sa proie. Le Renard s'en saisit, et dit : « Mon bon Monsieur, Apprenez que tout flatteur Vit aux dépens de celui qui l'écoute : Cette leçon vaut bien un fromage, sans doute. » Le Corbeau, honteux et confus, Jura, mais un peu tard, qu'on ne l'y prendrait plus.

swaks --body french.txt --add-header "MIME-Version: 1.0" --add-header "Content-Type: text/html;charset=iso-8859-2" --to aatel@cosco.com -s xxxxx.cloudapp.net -p 25 I thought haraka would convert the message body from iso-8859-2 to UTF-8. Am I incorrect?

Thanks,

Jeff

— Reply to this email directly or view it on GitHub.

visualjeff commented 9 years ago

I'm asking because we were dumping messages into CouchDB and for testers to view via an Ember app. Its been useful for testing autogenerated messages. Anyway, I was hoping some conversion would take place before the plugin writes out to Couch. The fact that it doesn't convert has actually helped us catch some poorly crafted French emails. Which has been helpful. Anyway, I appreciate the response.