[GH-ISSUE #3661] webmail search internal server error (when query is words with space) #1880

Closed
opened 2026-02-27 11:19:41 +03:00 by kerem · 0 comments
Owner

Originally created by @xinomilo on GitHub (Aug 6, 2025).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/3661

Impacted versions

  • OS Type: Debian
    
  • OS Version: 12.11
    
  • Database Type: MySQL (MariaDB)
    
  • Database version: 10.11.11
    
  • Modoboa: 2.4.9
    
  • installer used: No (used installer a few years ago, manually updating since..)
    
  • Webserver: Nginx
    

Steps to reproduce

try to search for any 2 words with spaces in webmail.

Current behavior

internal server error produced if search query contains spaces. example "word word". (same with any 2 words with space).

uwsgi log :
example.net [pid: 3944542|app: 1|req: 131/1189] xxx.xxx.xxx.xxx () {60 vars in 1109 bytes} [Wed Aug 6 11:07:31 2025] GET /api/v2/webmail/emails/?mailbox=INBOX&page=1&search=word+word => generated 116 bytes in 891 msecs (HTTP/2.0 500) 5 headers in 173 bytes (2 switches on core 0)

browser red popup msg : { "error": "UID command error: BAD [b'Error in IMAP command UID SORT: Unknown argument WORD (0.001 + 0.000 secs).']" }

Report at /api/v2/webmail/emails/

Internal Server Error: /api/v2/webmail/emails/

Request Method: GET
Request URL: https://example.net/api/v2/webmail/emails/?mailbox=INBOX&page=1&search=word+word
Django Version: 5.2.4
Exception Location: , line , in
Raised during: modoboa.webmail.viewsets.UserEmailViewSet
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.11.2
Python Path:

['.',
'',
'/usr/lib/python311.zip',
'/usr/lib/python3.11',
'/usr/lib/python3.11/lib-dynload',
'/srv/modoboa/env/lib/python3.11/site-packages']

Server time: Wed, 06 Aug 2025 11:08:17 +0000
Traceback

None

Request information
USER

user@example.net
GET
Variable Value
mailbox

'INBOX'

page

'1'

search

'word word'

POST

No POST data
FILES

No FILES data
COOKIES
Variable Value
csrftoken

'********************'

django_language

'el'

sessionid

'********************'

Expected behavior

webmail search works.

Image

thanks in advance,

Originally created by @xinomilo on GitHub (Aug 6, 2025). Original GitHub issue: https://github.com/modoboa/modoboa/issues/3661 # Impacted versions - OS Type: Debian - OS Version: 12.11 - Database Type: MySQL (MariaDB) - Database version: 10.11.11 - Modoboa: 2.4.9 - installer used: No (used installer a few years ago, manually updating since..) - Webserver: Nginx # Steps to reproduce try to search for any 2 words with spaces in webmail. # Current behavior internal server error produced if search query contains spaces. example "word word". (same with any 2 words with space). uwsgi log : example.net [pid: 3944542|app: 1|req: 131/1189] xxx.xxx.xxx.xxx () {60 vars in 1109 bytes} [Wed Aug 6 11:07:31 2025] GET /api/v2/webmail/emails/?mailbox=INBOX&page=1&search=word+word => generated 116 bytes in 891 msecs (HTTP/2.0 500) 5 headers in 173 bytes (2 switches on core 0) browser red popup msg : { "error": "UID command error: BAD [b'Error in IMAP command UID SORT: Unknown argument WORD (0.001 + 0.000 secs).']" } Report at /api/v2/webmail/emails/ Internal Server Error: /api/v2/webmail/emails/ Request Method: GET Request URL: https://example.net/api/v2/webmail/emails/?mailbox=INBOX&page=1&search=word+word Django Version: 5.2.4 Exception Location: , line , in Raised during: modoboa.webmail.viewsets.UserEmailViewSet Python Executable: /usr/bin/uwsgi-core Python Version: 3.11.2 Python Path: ['.', '', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/srv/modoboa/env/lib/python3.11/site-packages'] Server time: Wed, 06 Aug 2025 11:08:17 +0000 Traceback None Request information USER user@example.net GET Variable Value mailbox 'INBOX' page '1' search 'word word' POST No POST data FILES No FILES data COOKIES Variable Value csrftoken '********************' django_language 'el' sessionid '********************' # Expected behavior webmail search works. <img width="1393" height="578" alt="Image" src="https://github.com/user-attachments/assets/3b23b997-b445-4020-9126-2ee6656755ec" /> thanks in advance,
kerem closed this issue 2026-02-27 11:19:41 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1880
No description provided.