View Issue Details

IDProjectCategoryView StatusLast Update
0005284SOGoWeb Mailpublic2022-01-26 19:01
ReporterJuggernautMX Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platform[Server] LinuxOSRHEL/CentOSOS Version7
Product Version5.0.1 
Summary0005284: Wrong charset decoding of subject field in Web mail
Description

Hello!

On this week we faced the problem with incorrect displaying of subject field in mails from one of our partners
In mail source subject field looks like this - Subject: Àáîíåíòñêèé çàïðîñ ¹259694
Source encoding iso-8859-1 should be decoded to windows-1251, but it's not working
Mail body looks fine, cause it's multipart message with preferences for every nextpath.

Here is some additional info:

  • OS - Centos 7
  • SOGo - 5.0.1.20210317
  • nginx 1.16.1

Message source:

Subject: Àáîíåíòñêèé çàïðîñ ¹259694
Content-Type: multipart/related; type="multipart/alternative";charset="windows-1251";boundary=c365r345e34362m34423a2472t234211o234562r67846131i24351u23423465m
Priority: urgent
Precedence: bulk
X-Mailer: SoftPro MailAgent
X-Account: 0
X-Date: 17/03/2021 10:32:37
X-MessageID: 2632275
X-Type: 26
MIME-Version: 1.0

This is a multi-part message in MIME format.

--c365r345e34362m34423a2472t234211o234562r67846131i24351u23423465m
Content-Type: multipart/alternative;boundary="NextPath"

--NextPath
Content-Type: text/plain; charset="windows-1251"
Content-Transfer-Encoding:  8bit
TagsNo tags attached.

Activities

JuggernautMX

JuggernautMX

2021-03-18 06:52

reporter  

JuggernautMX

JuggernautMX

2021-03-18 06:58

reporter   ~0015153

Additional info - in another web mail software installed on this server (roundcube) this message is displayed correctly

francis

francis

2021-03-18 11:41

administrator   ~0015156

Please attach the raw source of the message.

JuggernautMX

JuggernautMX

2021-03-18 12:00

reporter   ~0015157

Raw source without some personal staff in attachment

Christian Mack

Christian Mack

2021-04-21 11:20

developer   ~0015222

Last edited: 2021-04-21 11:36

E-Mail standard RFC2822 states
https://www.rfc-editor.org/rfc/rfc2822#section-2.2

"2.2. Header Fields

Header fields are lines composed of a field name, followed by a colon
(":"), followed by a field body, and terminated by CRLF. A field
name MUST be composed of printable US-ASCII characters (i.e.,
characters that have values between 33 and 126, inclusive), except
colon. A field body may be composed of any US-ASCII characters,
except for CR and LF. However, a field body may contain CRLF when
used in header "folding" and "unfolding" as described in section
2.2.3. All field bodies MUST conform to the syntax described in
sections 3 and 4 of this standard."

Therefore your subject is an invalid header entry exceeding the allowed character range.
In order to use such characters in your subject, you have to use some encoding.
See https://www.rfc-editor.org/rfc/rfc2047

JuggernautMX

JuggernautMX

2021-04-21 12:30

reporter   ~0015223

How can i use encoding in SOGo?
Btw subject of this email displayed correctly in roundcube, which installed on same server.

Issue History

Date Modified Username Field Change
2021-03-18 06:52 JuggernautMX New Issue
2021-03-18 06:52 JuggernautMX File Added: Screenshot 2021-03-18 095152.png
2021-03-18 06:52 JuggernautMX File Added: Screenshot 2021-03-18 095135.png
2021-03-18 06:58 JuggernautMX Note Added: 0015153
2021-03-18 11:41 francis Note Added: 0015156
2021-03-18 12:00 JuggernautMX Note Added: 0015157
2021-03-18 12:00 JuggernautMX File Added: 1615966360.M511126P28578.S=12724,W=128812,S
2021-04-21 11:20 Christian Mack Note Added: 0015222
2021-04-21 11:36 Christian Mack Note Edited: 0015222
2021-04-21 12:30 JuggernautMX Note Added: 0015223
2022-01-26 19:01 francis Description Updated