View Issue Details

IDProjectCategoryView StatusLast Update
0005284SOGoWeb Mailpublic2021-04-21 08:30
ReporterJuggernautMX Assigned To 
Status newResolutionopen 
Platform[Server] LinuxOSRHEL/CentOSOS Version7
Product Version5.0.1 
Summary0005284: Wrong charset decoding of subject field in Web mail

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 -
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.

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

Content-Type: text/plain; charset="windows-1251"
Content-Transfer-Encoding: 8bit

TagsNo tags attached.




2021-03-18 02:52




2021-03-18 02:58

reporter   ~0015153

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



2021-03-18 07:41

administrator   ~0015156

Please attach the raw source of the message.



2021-03-18 08:00

reporter   ~0015157

Raw source without some personal staff in attachment

Christian Mack

Christian Mack

2021-04-21 07:20

developer   ~0015222

Last edited: 2021-04-21 07:36

View 2 revisions

E-Mail standard RFC2822 states

"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.



2021-04-21 08: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 02:52 JuggernautMX New Issue
2021-03-18 02:52 JuggernautMX File Added: Screenshot 2021-03-18 095152.png
2021-03-18 02:52 JuggernautMX File Added: Screenshot 2021-03-18 095135.png
2021-03-18 02:58 JuggernautMX Note Added: 0015153
2021-03-18 07:41 francis Note Added: 0015156
2021-03-18 08:00 JuggernautMX Note Added: 0015157
2021-03-18 08:00 JuggernautMX File Added: 1615966360.M511126P28578.S=12724,W=128812,S
2021-04-21 07:20 Christian Mack Note Added: 0015222
2021-04-21 07:36 Christian Mack Note Edited: 0015222 View Revisions
2021-04-21 08:30 JuggernautMX Note Added: 0015223