View Issue Details

IDProjectCategoryView StatusLast Update
0005303SOGoWeb Mailpublic2021-10-18 14:12
ReporterChristian Mack Assigned Tofrancis  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.1.0 
Fixed in Version5.2.0 
Summary0005303: email folders with questionmark "?" in name are unusable
Description

Questionmarks are valid characters in IMAP folder names.
When creating such a folder with SOGo 5.1.0 release, it will create it without problem.
You also can copy and move emails into that folder.
But when you try to open such a folder, SOGo will give you an 'Request failed' error on the right upper side, and not list any emails within that folder.

Steps To Reproduce
  1. login as userA to SOGo webinterface
  2. open Mail view
    3a. either select account and press three dots --> "New Folder..."
    3b. or select a folder and press three dots --> "New Subfolder..."
  3. type some name containing a questionmark, e.g. "folder with questionmark?"
  4. click on "OK"
    => folder will be created
  5. open another folder e.g. Inbox
  6. select an email in the list of emails by clicking on the icon in front of it
  7. click on the three dots above the list of emails --> "Move To" --> account name --> "folder with questionmark?"
    => email will be moved to that folder
  8. try to open folder "folder with questionmark?"
    => you get the above error, and nothing is displayed as content of that folder
  9. use another email client and check that postbox of userA
    => you can see "folder with questionmark?" and the email within it properly, and without any errors.
Additional Information

SOGo 5.1.0 release
Dovecot 2.3.14 (with mdbox storage)

When you try to create such a folder on the SOGo demo site, it will give you the following error box:
'An error occured while creating the mailbox "folder with questionmark?"
OK'

And you will get an error on right upper side with:
'The folder with name "folder with questionmark?" could not be created.'

But this will not prevent other email clients to create such a folder!

Tagsemail

Activities

francis

francis

2021-05-14 18:38

administrator   ~0015263

The limit is imposed by your IMAP server, not SOGo. I don't know for your dovecot instance, but for our demo site, the problem is that we use an older version of Cyrus imapd and the question mark wasn't yet supported.

Christian Mack

Christian Mack

2021-05-17 07:11

developer   ~0015267

Seems I wasn't clear enough.
Our IMAP server dovecot 2.3 has no problems with question marks in folder names.
With other email clients (Thunderbird, Outlook and Apple Mail) I can use them without problems.

I can create those folders with questionmark and move/copy emails into it with SOGo.
The only thing not working is accessing that folder and list its content, which in turn prevents me from accessing those emails moved or copied into it.

Christian Mack

Christian Mack

2021-10-13 07:17

developer   ~0015544

SOGo 5.2.0
Have to reopen it, as it isn't completely fixed.

We had another user, who used a questionmark in the folder name.
This time it wasn't at the end.
Something like "project (?) preconsult"
Which resulted in the same problem.
She could create it and move emails into it.
But then she could not access the emails within.

francis

francis

2021-10-13 12:22

administrator   ~0015545

I can't reproduce the issue with Dovecot. Do you get an error when you open the mailbox or when you open a message within the mailbox? What error do you get exactly?

Christian Mack

Christian Mack

2021-10-13 12:32

developer   ~0015546

I get a "Request failed" when trying to open the mailbox/folder in web interface.

In sogo.log I see:
Oct 13 14:25:21 sogod [21006]: |SOGo| starting method 'POST' on uri '/SOGo/so/USERNAME1/Mail/0/folderOther_SP_Users/folderUSERNAME2/folderTest/folderNr2/folderwasMitFragezeichen?intern/view'
Oct 13 14:25:21 sogod [21006]: |SOGo| request took 0.092866 seconds to execute
Oct 13 14:25:21 sogod [21006]: (null) "POST /SOGo/so/USERNAME1/Mail/0/folderOther_SP_Users/folderUSERNAME2/folderTest/folderNr2/folderwasMitFragezeichen?intern/view HTTP/1.1" 500 36/45 0.095 - - 0 - 69

francis

francis

2021-10-13 17:21

administrator   ~0015548

The question mark should be encoded using the native function window.encodeURIComponent. Can you place a breakpoint here and inspect the.path variable?

Christian Mack

Christian Mack

2021-10-15 09:13

developer   ~0015556

In Firefox and Chromium I only can set a breakpoint at line 209.
There path is:
"/SOGo/so/USERNAME1/Mail/0/folderOther_SP_Users/folderUSERNAME2/folderTest/folderNr2/folderwasMitFragezeichen%3Fintern/view"

francis

francis

2021-10-15 12:26

administrator   ~0015557

You're not suppose to see the question mark in your logs. It should be %3F. Can you check the URL that your browser sends from the dev tools?

Are you using Apache with mod_proxy? Can you check your Web server configuration?

Christian Mack

Christian Mack

2021-10-15 13:55

developer   ~0015558

The browser sends %3f I can see it in the Apache proxy logs.
And yes we use Apache with mod_proxy.

Apache Config:

[...]
ProxyPreserveHost On
ProxyPass /SOGo http://sogo.xxxx.de:20000/SOGo retry=0 connectiontimeout=5 keepalive=Off timeout=240
RequestHeader    unset  Accept-Encoding

<Proxy http://sogo.xxxx.de:20000/SOGo>
   RequestHeader set "x-webobjects-server-port" "443"
   RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}s"
   RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}s"
   RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
   RequestHeader set "x-webobjects-remote-host" "%{SENDER_IP_ADDRESS}e"

   AddDefaultCharset UTF-8

   Require all granted

</Proxy>
[...]

francis

francis

2021-10-15 20:40

administrator   ~0015560

Can you try to add nocanon to your ProxyPass directive?

Christian Mack

Christian Mack

2021-10-18 14:02

developer   ~0015561

Yesssss.
That did the trick.
Now I also get %3F on the sogo application side.
You should add that to the default settings.

Related Changesets

sogo: master 657f00f9

2021-05-18 13:34

francis


Details Diff
fix(mail): handle folders that end with a question mark

We now avoid using NSURL.

Fixes 0005303
Affected Issues
0005303
mod - SoObjects/Mailer/SOGoMailFolder.m Diff File
mod - UI/MailerUI/UIxMailFolderActions.m Diff File
mod - UI/WebServerResources/js/Mailer/sgMailboxListItem.directive.js Diff File

sogo: master ecbdf450

2021-10-18 10:10

francis


Details Diff
chore(Apache): pass the URL path "raw" to sogod

Fixes 0005303
Affected Issues
0005303
mod - Apache/SOGo.conf Diff File

Issue History

Date Modified Username Field Change
2021-04-20 08:48 Christian Mack New Issue
2021-04-20 08:48 Christian Mack Tag Attached: email
2021-05-14 18:38 francis Note Added: 0015263
2021-05-17 07:11 Christian Mack Note Added: 0015267
2021-05-18 17:36 francis Changeset attached => sogo master 657f00f9
2021-05-18 17:36 francis Assigned To => francis
2021-05-18 17:36 francis Resolution open => fixed
2021-05-18 17:37 francis Status new => resolved
2021-05-18 17:37 francis Fixed in Version => 5.1.1
2021-10-13 07:17 Christian Mack Status resolved => feedback
2021-10-13 07:17 Christian Mack Resolution fixed => reopened
2021-10-13 07:17 Christian Mack Note Added: 0015544
2021-10-13 12:22 francis Note Added: 0015545
2021-10-13 12:32 Christian Mack Note Added: 0015546
2021-10-13 12:32 Christian Mack Status feedback => assigned
2021-10-13 17:21 francis Note Added: 0015548
2021-10-15 09:13 Christian Mack Note Added: 0015556
2021-10-15 12:26 francis Note Added: 0015557
2021-10-15 13:55 Christian Mack Note Added: 0015558
2021-10-15 20:40 francis Note Added: 0015560
2021-10-18 14:02 Christian Mack Note Added: 0015561
2021-10-18 14:11 francis Changeset attached => sogo master ecbdf450
2021-10-18 14:11 francis Resolution reopened => fixed
2021-10-18 14:12 francis Status assigned => resolved
2021-10-18 14:12 francis Fixed in Version 5.1.1 => 5.2.0