Brevo SMTP miss-configuration 500 error

Hello Community Noob in town.
Tryed to configure Brevo worked with Brevos credentials but when i tryed to pass the actual user got me in troubles

2024/05/09 22:29:28 [error] 1602#0: *49 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: ksort(): Argument #1 ($array) must be of type array, null given in /usr/local/hestia/web/list/mail/index.php:13
Stack trace:
#0 /usr/local/hestia/web/list/mail/index.php(13): ksort()
#1 {main}
  thrown in /usr/local/hestia/web/list/mail/index.php on line 13" while reading response header from upstream, client: 192.168.1.20, server: _, request: "GET /list/mail/ HTTP/2.0", upstream: "fastcgi://unix:/run/hestia-php.sock:", host: "192.168.1.20:8899", referrer: "https://192.168.1.20:8899/edit/web/?domain=koukisgas.gr&token=5dde

tryed this one but is not much of a help

:~# bash /usr/local/hestia/install/upgrade/manual/configure-server-smtp.sh

can someone help me debug this plz?

Thank you in advance :blush:

Hi @giormatsis,

Show the output of these commands (replace YourUser with the actual user hosting the mail domain):

v-list-mail-domains YourUser json
v-list-mail-domains YourUser json | cat -A

sorry for my noob mistakes :melting_face:

That is not your user, you must use the actual Hestia user, not your mail address.

:~# v-list-mail-domains kook json

{
Error: Invalid object format: DOMAIN='koukisgas.gr' ANTIVIRUS='yes' ANTISPAM='yes' REJECT='no' DKIM='yes' WEBMAIL='roundcube' SSL='yes' LETSENCRYPT_FAIL_COUNT='0' LETSENCRYPT='yes' CATCHALL='' U_SMTP_RELAY='true' U_SMTP_RELAY_HOST='smtp-relay.brevo.com' U_SMTP_RELAY_PORT='587' U_SMTP_RELAY_USERNAME='[email protected]' U_SMTP_RELAY_PASSWORD='pass_removed' ACCOUNTS='1' RATE_LIMIT='10' U_DISK='1' SUSPENDED='no' TIME='18:42:50' DATE='2023-12-10'
v-list-mail-domains kook json | cat -A
{$
Error: Invalid object format: DOMAIN='koukisgas.gr' ANTIVIRUS='yes' ANTISPAM='yes' REJECT='no' DKIM='yes' WEBMAIL='roundcube' SSL='yes' LETSENCRYPT_FAIL_COUNT='0' LETSENCRYPT='yes' CATCHALL='' U_SMTP_RELAY='true' U_SMTP_RELAY_HOST='smtp-relay.brevo.com' U_SMTP_RELAY_PORT='587' U_SMTP_RELAY_USERNAME='[email protected]' U_SMTP_RELAY_PASSWORD='pass_removed' ACCOUNTS='1' RATE_LIMIT='10' U_DISK='1' SUSPENDED='no' TIME='18:42:50' DATE='2023-12-10'$

The problem is the password, it contains backstick character ` and this character isn’t allowed by the function that checks these fields (parse_object_kv_list in main.sh) so you should modify the password to remove that character.

Thank you very much sahsanu for your time and efforts
removed SMTP from

/usr/local/hestia/data/users/YOUR_USER