JSON parse error, SMTP not working

After upgrading to 1.32.0 I noticed that Vaultwarden is not able to send e-mail anymore. As I have access to the mailserver logs, I can confirm that there is no incoming connection attempt at all.

When sending a test e-mail from the admin page, this error is shown:

Error sending SMTP test email
504 - 

[Catch] SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Looks like there is something wrong in config.json. I did not edit it manually, just via the admin page.
Here is the config (some content [hidden]):

{
  "domain": "[hidden]",
  "sends_allowed": true,
  "incomplete_2fa_time_limit": 3,
  "disable_icon_download": true,
  "signups_allowed": false,
  "signups_verify": false,
  "signups_verify_resend_time": 3600,
  "signups_verify_resend_limit": 6,
  "invitations_allowed": false,
  "emergency_access_allowed": false,
  "email_change_allowed": true,
  "password_iterations": 600000,
  "password_hints_allowed": true,
  "show_password_hint": true,
  "admin_token": "[hidden]",
  "invitation_org_name": "Vaultwarden",
  "ip_header": "X-Real-IP",
  "icon_redirect_code": 302,
  "icon_cache_ttl": 2592000,
  "icon_cache_negttl": 259200,
  "icon_download_timeout": 10,
  "http_request_block_non_global_ips": true,
  "disable_2fa_remember": false,
  "authenticator_disable_time_drift": false,
  "require_device_email": false,
  "reload_templates": false,
  "log_timestamp_format": "%Y-%m-%d %H:%M:%S.%3f",
  "admin_session_lifetime": 20,
  "increase_note_size_limit": false,
  "_enable_yubico": false,
  "_enable_duo": false,
  "_enable_smtp": true,
  "use_sendmail": false,
  "smtp_host": "[hidden]",
  "smtp_security": "force_tls",
  "smtp_port": 465,
  "smtp_from": "[hidden]",
  "smtp_from_name": "Vaultwarden",
  "smtp_username": "[hidden]",
  "smtp_password": "[hidden]",
  "smtp_auth_mechanism": "plain",
  "smtp_timeout": 20,
  "smtp_embed_images": true,
  "smtp_accept_invalid_certs": false,
  "smtp_accept_invalid_hostnames": false,
  "_enable_email_2fa": false,
  "email_token_size": 6,
  "email_expiration_time": 600,
  "email_attempts_limit": 3,
  "email_2fa_enforce_on_verified_invite": false,
  "email_2fa_auto_fallback": false
}

And here is the config from the diagnostics page:

### Your environment (Generated via diagnostics page)
* Vaultwarden version: v1.32.0
* Web-vault version: v2024.6.2b
* OS/Arch: linux/x86_64
* Running within a container: true (Base: Debian)
* Environment settings overridden: true
* Uses a reverse proxy: true
* IP Header check: true (X-Real-IP)
* Internet access: true
* Internet access via a proxy: false
* DNS Check: true
* Browser/Server Time Check: true
* Server/NTP Time Check: true
* Domain Configuration Check: true
* HTTPS Check: true
* Database type: SQLite
* Database version: 3.46.0
* Clients used: 
* Reverse proxy and version: 
* Other relevant information: 

### Config (Generated via diagnostics page)
<details><summary>Show Running Config</summary>

**Environment settings which are overridden:** ADMIN_TOKEN

Thank you for any help and thank you for this great project!

It works fine for me.

I would suggest to enable SMTP_DEBUG=true restart and test again and check what the logs mention.

Thank you for the quick reply! I did some more tests and have to say, that this error is not related to Vaultwarden. Sorry for the noise!

If somebody is interested about the details:

  • The mailserver is running as a docker container. It works great since years, all necessary configurations (SPF, DKIM, DMARC, etc.) are valid and working.
  • All clients can connect to the mailserver and send e-mails.
  • Just (smtp-)clients running on the same host as the mailserver can not send e-mails.

In this case, Vaultwarden is running on the same host system as the mailserver. I have to figure out why this is not working anymore (since it used to be fine).

Again, nothing related to Vaultwarden.

Thank you!