Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5454

Length of encoded subject violate RFC2047 : The subject part will be made "Mojibake" - failing MIME encode -, when the decoded subject length is over 75 bytes.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8.16rc1, 2.0.4rc1, 2.1.0
    • None
    • Server (S)
    • I discovered this problem in zabbix 1.8.3. However, I worry that in latest version have it yet.

      Please Length of encoded subject make shorter than 75 characters with Email notice.
      I discovered this problem in zabbix 1.8.3. However, I worry that in latest version have it yet.

      When you send message with the Email (media type), zabbix sending with MIME decoded Header like below...
      But, in this case some user received the alert mail which have that "Subject" part is "Mojibake".

      Subject: =?UTF-8?B?5pel5pys6Kqe44Gg44KI44CC44CO5LuK5pel44KC5YWD5rCX44Gr44G/44KT44Gq6aCR5by144KM44CCWmFiYml444GL44KJ44Ki44Op44O844OI5Ye644Gm44G+44GZ44CC44Ob44K544OI5ZCN44GvaG9zdG5hbWVob2dl44Gn44Ki44Kk44OG44Og44GvaXRlbWhvZ2XjgafnirbmhYvjga9Qcm9ibGVtOjEwMCXjgac=44GZ44KI44CC44CP?=
      MIME-Version: 1.0
      Content-Type: text/plain; charset="UTF-8"
      Content-Transfer-Encoding: base64

      This hedder is almost correct, but "Subject" is too long. "RFC2047" says as below...

      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. (Ref. http://www.ietf.org/rfc/rfc2047.txt )

      I think the "Subject" part should be as bellow...

      Subject: =?UTF-8?B?5pel5pys6Kqe44Gg44KI44CC44CO5LuK5pel44KC5YWD5rCX44Gr44G/44KT?=
      =?UTF-8?B?44Gq6aCR5by144KM44CCWmFiYml444GL44KJ44Ki44Op44O844OI5Ye644Gm?=
      =?UTF-8?B?44G+44GZ44CC44Ob44K544OI5ZCN44GvaG9zdG5hbWVob2dl44Gn44Ki44Kk?=
      =?UTF-8?B?44OG44Og44GvaXRlbWhvZ2XjgafnirbmhYvjga9Qcm9ibGVtOjEwMCXjgac=?=
      =?UTF-8?B?44GZ44KI44CC44CP?=

      For Example: The case of microsoft exchange 2007
      By default, Exchange Server 2007 will not attempt to decode any subject header that exceeds
      a total encoded length greater than 255 characters.
      So the subject line will be garbled when the limit has been reached.
      http://blogs.technet.com/b/stuartp/archive/2009/02/17/subjects-appearing-garbled-or-corrupted-when-they-are-encoded.aspx
      (Microsoft Exchange 2010(1000 Byte) is better than 2007(256 Byte) in Japanese Env.)

        1. zabbix-2.0.1-mail-rfc2074.patch
          5 kB
          Jairo Eduardo Lopez Fuentes Nacarino

            Unassigned Unassigned
            haruchiyo Haruyoshi CHIYODA
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: