stefanpejcic / OpenPanel

A highly customizable web hosting control panel built with Docker 🐳
https://openpanel.com
216 stars 33 forks source link

'Supplied non-number argument' error when creating emails #268

Closed stefanpejcic closed 2 weeks ago

stefanpejcic commented 2 weeks ago

OpenPanel version(s) affected

0.3.4

What OS are you using?

Ubuntu

Description

when creating email accounts, if uppercase letters are present in username or password (and later if creating multiple accounts really fast), dms will return warning for dovecot accounts:

2024-11-07 11:07:05+00:00 ERROR listmailuser: Supplied non-number argument '' to '_bytes_to_human_readable_size()'
2024-11-07 11:07:05+00:00 ERROR listmailuser: Aborting

and we then display error to usage:

ERROR: Failed to add email sdffsddfs@stefan.openpanel.org: Command '['opencli', 'email-setup', 'email', 'add', 'sdffsddfs@stefan.openpanel.org', 'vevAFiHkI3oVPHa5']' returned non-zero exit status 1.

but email does get created.

this is related to https://github.com/docker-mailserver/docker-mailserver/issues/4011

How to reproduce

create email wth uppercase letter in username or password

Possible Solution

lets add another check in exception, check if "Supplied non-number argument" in error_message and consider it success

Additional Context

No response