[GH-ISSUE #3690] webmail search internal server error (when query is non-latin words, eg. greek) #1885

Closed
opened 2026-02-27 11:19:42 +03:00 by kerem · 1 comment
Owner

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

Impacted versions

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

Steps to reproduce

try to search for any greek or another non-latin word. (tried turkish too).

Current behavior

internal server error produced if search query contains non-latin characters.. example below with "δημήτρης". (random greek name, but seen the same behavior with turkish characters too.).

red popup message :
{ "error": "UID command error: BAD [b'Error in IMAP command UID SORT: 8bit data in atom (0.001 + 0.000 secs).']" }

uwsgi log :
example.net [pid: 2860552|app: 1|req: 57/518] xxx.xxx.xxx.xxx () {60 vars in 1173 bytes} [Thu Aug 21 13:32:07 2025] GET /api/v2/webmail/emails/?mailbox=INBOX&page=1&search=%CE%B4%CE%B7%CE%BC%CE%AE%CF%84%CF%81%CE%B7%CF%82 => generated 112 bytes in 803 msecs (HTTP/2.0 500) 5 headers in 173 bytes (1 switches on core 0)

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

Request Method: GET
Request URL: https://example.net/api/v2/webmail/emails/?mailbox=INBOX&page=1&search=%CE%B4%CE%B7%CE%BC%CE%AE%CF%84%CF%81%CE%B7%CF%82
Django Version: 5.2.5
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: Thu, 21 Aug 2025 13:32:07 +0300
Traceback

None

Request information
USER

user@example.net
GET
Variable Value
mailbox

'INBOX'

page

'1'

search

'δημήτρης'

POST

No POST data
FILES

No FILES data
COOKIES
Variable Value
csrftoken

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

django_language

'en'

sessionid

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

META
Variable Value
CONTENT_LENGTH

''

CONTENT_TYPE

''

CSRF_COOKIE

'xxxxxxxxxxxxxxxxxxxxxxxxx'

DOCUMENT_ROOT

'/srv/modoboa/instance'

HTTPS

'on'

HTTP_ACCEPT

'application/json, text/plain, /'

HTTP_ACCEPT_ENCODING

'gzip, deflate, br, zstd'

HTTP_ACCEPT_LANGUAGE

'el'

HTTP_AUTHORIZATION

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

HTTP_COOKIE

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

HTTP_HOST

'example.net'

HTTP_PRIORITY

'u=0'

HTTP_REFERER

'https://example.net/user/webmail'

HTTP_SEC_FETCH_DEST

'empty'

HTTP_SEC_FETCH_MODE

'cors'

HTTP_SEC_FETCH_SITE

'same-origin'

HTTP_SEC_GPC

'1'

HTTP_TE

'trailers'

HTTP_USER_AGENT

'Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0'

PATH_INFO

'/api/v2/webmail/emails/'

QUERY_STRING

'mailbox=INBOX&page=1&search=%CE%B4%CE%B7%CE%BC%CE%AE%CF%84%CF%81%CE%B7%CF%82'

REMOTE_ADDR

'xxx.xxx.xxx.xxx'

REMOTE_PORT

'44930'

REQUEST_METHOD

'GET'

REQUEST_SCHEME

'https'

REQUEST_URI

'/api/v2/webmail/emails/?mailbox=INBOX&page=1&search=%CE%B4%CE%B7%CE%BC%CE%AE%CF%84%CF%81%CE%B7%CF%82'

SCRIPT_NAME

''

SERVER_NAME

'example.net'

SERVER_PORT

'443'

SERVER_PROTOCOL

'HTTP/2.0'

UWSGI_APPID

'example.net|'

UWSGI_SCRIPT

'instance.wsgi:application'

uwsgi.node

b'example'

uwsgi.version

b'2.0.21-debian'

wsgi.errors

<_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>

wsgi.file_wrapper

wsgi.input

<uwsgi._Input object at 0x7f2cf6ab68d0>

wsgi.multiprocess

True

wsgi.multithread

False

wsgi.run_once

False

wsgi.url_scheme

'https'

wsgi.version

(1, 0)

Expected behavior

ability to search for any words (latin + non-latin)

Originally created by @xinomilo on GitHub (Aug 21, 2025). Original GitHub issue: https://github.com/modoboa/modoboa/issues/3690 # Impacted versions * OS Type: Debian * OS Version: 12.11 * Database Type: MySQL (MariaDB) * Database version: 10.11.11 * Modoboa: 2.4.10 * installer used: No (used installer a few years ago, manually updating since..) * Webserver: Nginx # Steps to reproduce try to search for any greek or another non-latin word. (tried turkish too). # Current behavior internal server error produced if search query contains non-latin characters.. example below with "δημήτρης". (random greek name, but seen the same behavior with turkish characters too.). red popup message : { "error": "UID command error: BAD [b'Error in IMAP command UID SORT: 8bit data in atom (0.001 + 0.000 secs).']" } uwsgi log : example.net [pid: 2860552|app: 1|req: 57/518] xxx.xxx.xxx.xxx () {60 vars in 1173 bytes} [Thu Aug 21 13:32:07 2025] GET /api/v2/webmail/emails/?mailbox=INBOX&page=1&search=%CE%B4%CE%B7%CE%BC%CE%AE%CF%84%CF%81%CE%B7%CF%82 => generated 112 bytes in 803 msecs (HTTP/2.0 500) 5 headers in 173 bytes (1 switches on core 0) Internal Server Error: /api/v2/webmail/emails/ Request Method: GET Request URL: https://example.net/api/v2/webmail/emails/?mailbox=INBOX&page=1&search=%CE%B4%CE%B7%CE%BC%CE%AE%CF%84%CF%81%CE%B7%CF%82 Django Version: 5.2.5 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: Thu, 21 Aug 2025 13:32:07 +0300 Traceback None Request information USER user@example.net GET Variable Value mailbox 'INBOX' page '1' search 'δημήτρης' POST No POST data FILES No FILES data COOKIES Variable Value csrftoken '********************' django_language 'en' sessionid '********************' META Variable Value CONTENT_LENGTH '' CONTENT_TYPE '' CSRF_COOKIE 'xxxxxxxxxxxxxxxxxxxxxxxxx' DOCUMENT_ROOT '/srv/modoboa/instance' HTTPS 'on' HTTP_ACCEPT 'application/json, text/plain, */*' HTTP_ACCEPT_ENCODING 'gzip, deflate, br, zstd' HTTP_ACCEPT_LANGUAGE 'el' HTTP_AUTHORIZATION '********************' HTTP_COOKIE '********************' HTTP_HOST 'example.net' HTTP_PRIORITY 'u=0' HTTP_REFERER 'https://example.net/user/webmail' HTTP_SEC_FETCH_DEST 'empty' HTTP_SEC_FETCH_MODE 'cors' HTTP_SEC_FETCH_SITE 'same-origin' HTTP_SEC_GPC '1' HTTP_TE 'trailers' HTTP_USER_AGENT 'Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0' PATH_INFO '/api/v2/webmail/emails/' QUERY_STRING 'mailbox=INBOX&page=1&search=%CE%B4%CE%B7%CE%BC%CE%AE%CF%84%CF%81%CE%B7%CF%82' REMOTE_ADDR 'xxx.xxx.xxx.xxx' REMOTE_PORT '44930' REQUEST_METHOD 'GET' REQUEST_SCHEME 'https' REQUEST_URI '/api/v2/webmail/emails/?mailbox=INBOX&page=1&search=%CE%B4%CE%B7%CE%BC%CE%AE%CF%84%CF%81%CE%B7%CF%82' SCRIPT_NAME '' SERVER_NAME 'example.net' SERVER_PORT '443' SERVER_PROTOCOL 'HTTP/2.0' UWSGI_APPID 'example.net|' UWSGI_SCRIPT 'instance.wsgi:application' uwsgi.node b'example' uwsgi.version b'2.0.21-debian' wsgi.errors <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'> wsgi.file_wrapper <built-in function uwsgi_sendfile> wsgi.input <uwsgi._Input object at 0x7f2cf6ab68d0> wsgi.multiprocess True wsgi.multithread False wsgi.run_once False wsgi.url_scheme 'https' wsgi.version (1, 0) # Expected behavior ability to search for any words (latin + non-latin)
kerem closed this issue 2026-02-27 11:19:42 +03:00
Author
Owner

@ZiganshinIB commented on GitHub (Sep 1, 2025):

I have exactly the same problem. Is there any information for a temporary solution?

<!-- gh-comment-id:3241077615 --> @ZiganshinIB commented on GitHub (Sep 1, 2025): I have exactly the same problem. Is there any information for a temporary solution?
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#1885
No description provided.