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.

    Details

    • Type: Incident report Incident report
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.16rc1, 2.0.4rc1, 2.1.0
    • Component/s: Server (S)
    • Labels:
    • Environment:
      I discovered this problem in zabbix 1.8.3. However, I worry that in latest version have it yet.

      Description

      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

        Issue Links

          Activity

          Haruyoshi CHIYODA created issue -
          richlv made changes -
          Field Original Value New Value
          Link This issue is duplicated by ZBX-5455 [ ZBX-5455 ]
          Hide
          Kodai Terashima added a comment -

          I confirmed. Zabbix serve does not split mime encorded subject in 1.8 latest, and 2.0 has same code.

          Show
          Kodai Terashima added a comment - I confirmed. Zabbix serve does not split mime encorded subject in 1.8 latest, and 2.0 has same code.
          Andris Mednis made changes -
          Assignee Andris Mednis [ andris ]
          Hide
          Jairo Eduardo Lopez Fuentes Nacarino added a comment - - edited

          Hello,

          my name is Jairo Lopez, I have made a patch to solve the Mojibake issue and RFC2047 compliance for email subjects.

          Attached is my first attempt at a patch.

          I was working on a Zabbix 2.0.1 but the patch should be able to be applied with no major changes up to the 2.0.3rc1 version.

          I thank for your time and hope to get feedback.

          Show
          Jairo Eduardo Lopez Fuentes Nacarino added a comment - - edited Hello, my name is Jairo Lopez, I have made a patch to solve the Mojibake issue and RFC2047 compliance for email subjects. Attached is my first attempt at a patch. I was working on a Zabbix 2.0.1 but the patch should be able to be applied with no major changes up to the 2.0.3rc1 version. I thank for your time and hope to get feedback.
          Jairo Eduardo Lopez Fuentes Nacarino made changes -
          Attachment zabbix-2.0.1-mail-rfc2074.patch [ 19890 ]
          Hide
          Andris Mednis added a comment -

          Thanks, Jairo, for your patch!
          It will help to fix the issue faster.

          Show
          Andris Mednis added a comment - Thanks, Jairo, for your patch! It will help to fix the issue faster.
          Andris Mednis made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Alexei Vladishev made changes -
          Zabbix ID NA RTF
          Hide
          Andris Mednis added a comment -

          Hi, Jairo!

          I took your patch as a basis for fixing the issue. Currently working on fixing 1.8 and modifying the patch to our coding guidelines. Thanks for your contribution!

          Show
          Andris Mednis added a comment - Hi, Jairo! I took your patch as a basis for fixing the issue. Currently working on fixing 1.8 and modifying the patch to our coding guidelines. Thanks for your contribution!
          Hide
          Jairo Eduardo Lopez Fuentes Nacarino added a comment -

          Hi Andris!

          I am glad the patch was of use!

          I realized that my code was not fully compliant with your coding guidelines a couple of days ago. For next time I'll be more careful so that you guys have more time to check the thought process.

          Thank you for the feedback and for taking time to look at the issue. I am looking forward to seeing the end result!

          Show
          Jairo Eduardo Lopez Fuentes Nacarino added a comment - Hi Andris! I am glad the patch was of use! I realized that my code was not fully compliant with your coding guidelines a couple of days ago. For next time I'll be more careful so that you guys have more time to check the thought process. Thank you for the feedback and for taking time to look at the issue. I am looking forward to seeing the end result!
          Hide
          Andris Mednis added a comment - - edited

          Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5454 (for 1.8 branch)
          Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5454-2.0 (for 2.0 branch)

          Show
          Andris Mednis added a comment - - edited Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5454 (for 1.8 branch) Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5454-2.0 (for 2.0 branch)
          Andris Mednis made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Assignee Andris Mednis [ andris ]
          Resolution Fixed [ 1 ]
          Alexander Vladishev made changes -
          Assignee Alexander Vladishev [ sasha ]
          Hide
          Alexander Vladishev added a comment -

          Successfully tested!

          Please review my changes in r30223 and r30224.

          Show
          Alexander Vladishev added a comment - Successfully tested! Please review my changes in r30223 and r30224.
          Alexander Vladishev made changes -
          Status Resolved [ 5 ] Tested [ 10002 ]
          Assignee Alexander Vladishev [ sasha ] Andris Mednis [ andris ]
          Hide
          Andris Mednis added a comment -

          Fixed in versions pre-1.8.16 rev.30670, pre-2.0.4 rev. 30675 and pre-2.1.0 rev. 30676.

          Show
          Andris Mednis added a comment - Fixed in versions pre-1.8.16 rev.30670, pre-2.0.4 rev. 30675 and pre-2.1.0 rev. 30676.
          Andris Mednis made changes -
          Status Tested [ 10002 ] Closed [ 6 ]
          Assignee Andris Mednis [ andris ]
          Fix Version/s 1.8.16rc1 [ 11318 ]
          Fix Version/s 2.0.4rc1 [ 11316 ]
          Fix Version/s 2.1.0 (trunk) [ 11301 ]
          Alexei Vladishev made changes -
          Workflow Zabbix workflow [ 26133 ] Zabbix workflow - new [ 46316 ]
          Alexander Vladishev made changes -
          Workflow Zabbix workflow - new [ 46316 ] Copy of Zabbix workflow - new [ 66424 ]
          Alexander Vladishev made changes -
          Workflow Copy of Zabbix workflow - new [ 66424 ] Zabbix workflow - new [ 81642 ]
          Gatis Rumbens made changes -
          Issue Type Bug [ 1 ] Incident report [ 10110 ]
          Zabbix ID RTF
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          13d 2h 9m 1 Andris Mednis 2012 Aug 28 16:17
          In Progress In Progress Resolved Resolved
          10d 2h 34m 1 Andris Mednis 2012 Sep 07 18:51
          Resolved Resolved Merging Merging
          6d 23h 7m 1 Alexander Vladishev 2012 Sep 14 17:59
          Merging Merging Closed Closed
          20d 22h 53m 1 Andris Mednis 2012 Oct 05 16:52

            People

            • Assignee:
              Unassigned
              Reporter:
              Haruyoshi CHIYODA
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: