Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-139

Redirect mailet: MIME-encoded subject is changed event if a prefix is not specified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.1
    • None
    • None
    • Operating System: FreeBSD
      Platform: PC
    • 24053

    Description

      When a message was processed by Redirect mailet, a MIME-encoded
      subject may be changed its charset to server's default charset.
      Javamail decodes/encodes a header automatically.

      If a prefix was specified, change of charset is reasonable,
      because a header is modified. But even if a prefix was not specified,
      Redirect mailet changes a charset of a header without any text addition.

      I'm using Redirect mailet on James 2.1.3 with settings like below.

      <mailet match="SenderIs=xxxx@xxxxx" class="Redirect">
      <recipients>yyyy@yyyyy</recipients>
      <inline>unaltered</inline>
      <attachment>none</attachment>
      <passThrough>TRUE</passThrough>
      </mailet>

      I thought the mailet will duplicate a message as it is.
      But a MIME-encoded subject is re-encoded with a default encoding.
      A problem may occur if javamail couldn't decode a subject header
      correctly or if server's locale was not set appropriately.

      Please don't touch a subject header when a prefix is not
      specified:

      //Set additional headers
      if (!getSubjectPrefix().equals(""))

      { reply.setSubject(getSubjectPrefix() + message.getSubject()); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            iwasa@cosmo-system.jp Iwasa Kazmi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: