vexim / vexim2

Virtual Exim 2
Other
70 stars 47 forks source link

Replace `imap_qprint()` and `imap_8bit()` with `quoted_printable_[de|en]code()` #202

Closed rimas-kudelis closed 8 years ago

rimas-kudelis commented 8 years ago

Instead of using these functions provided by the IMAP module, which might be unavailable, we can use quoted_printable_encode() and quoted_printable_decode(). This means that we'll only depend on the IMAP module to check user's quota from now on.

Udera commented 8 years ago

If I use this vacation message:

ä
ö
ü
ß

I get the correct reply with the current version. With your modification, I get:

=E4
=F6
=FC
=DF

In vexim it is always shown correct. There is some encoding issue, but I couldn't figure out where and why.

rimas-kudelis commented 8 years ago

It's weird that you get escape codes for single-byte characters instead of double-byte. Couple questions:

  1. are you testing with latest vexim? We have the following line in config/httpheaders.php, so your vacation should be stored in QP-encoded UTF-8, not QP-encoded ISO-8859-1 in the database: header("Content-Type: text/html; charset=utf-8");
  2. Do you have the following line in your vacation transport: headers = "Content-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: quoted-printable" ? If you do, your e-mail client should be able to undersand that the vacation message needs QP-decoding.
  3. Do you have PHP IMAP module installed and enabled?
Udera commented 8 years ago

I used the latest master and your pull request. I didn't update the whole exim4.conf, most was an old part without the encoding-headers. And php-imap was missing as well. Now everything works as it is supposed to.