SMTP error: response error: incomplete response

Hi!
Can not setup SMTP:

Your environment (Generated via diagnostics page)

  • Vaultwarden version: v1.27.0-f2108990
  • Web-vault version: v2023.2.0
  • OS/Arch: linux/x86_64
  • Running within Docker: false (Base: Not applicable)
  • Environment settings overridden: true
  • Uses a reverse proxy: false
  • 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: false
  • HTTPS Check: true
  • Database type: SQLite
  • Database version: 3.39.2
  • Clients used:
  • Reverse proxy and version:
  • Other relevant information:

Config (Generated via diagnostics page)

Show Running Config

Environment settings which are overridden: ADMIN_TOKEN

{
  "_duo_akey": null,
  "_enable_duo": false,
  "_enable_email_2fa": false,
  "_enable_smtp": true,
  "_enable_yubico": true,
  "_icon_service_csp": "",
  "_icon_service_url": "",
  "_ip_header_enabled": true,
  "_smtp_img_src": "cid:",
  "admin_ratelimit_max_burst": 3,
  "admin_ratelimit_seconds": 300,
  "admin_session_lifetime": 20,
  "admin_token": "***",
  "allowed_iframe_ancestors": "",
  "attachments_folder": "/opt/vaultwarden/data/attachments",
  "authenticator_disable_time_drift": false,
  "data_folder": "/opt/vaultwarden/data",
  "database_conn_init": "",
  "database_max_conns": 10,
  "database_timeout": 30,
  "database_url": "********************************",
  "db_connection_retries": 15,
  "disable_2fa_remember": false,
  "disable_admin_token": false,
  "disable_icon_download": false,
  "domain": "*****://*******************",
  "domain_origin": "*****://*******************",
  "domain_path": "",
  "domain_set": true,
  "duo_host": null,
  "duo_ikey": null,
  "duo_skey": null,
  "email_attempts_limit": 3,
  "email_expiration_time": 600,
  "email_token_size": 6,
  "emergency_access_allowed": true,
  "emergency_notification_reminder_schedule": "0 3 * * * *",
  "emergency_request_timeout_schedule": "0 7 * * * *",
  "enable_db_wal": true,
  "event_cleanup_schedule": "0 10 0 * * *",
  "events_days_retain": null,
  "extended_logging": true,
  "helo_name": null,
  "hibp_api_key": null,
  "icon_blacklist_non_global_ips": true,
  "icon_blacklist_regex": null,
  "icon_cache_folder": "/opt/vaultwarden/data/icon_cache",
  "icon_cache_negttl": 259200,
  "icon_cache_ttl": 2592000,
  "icon_download_timeout": 10,
  "icon_redirect_code": 302,
  "icon_service": "internal",
  "incomplete_2fa_schedule": "30 * * * * *",
  "incomplete_2fa_time_limit": 3,
  "invitation_expiration_hours": 120,
  "invitation_org_name": "Vaultwarden",
  "invitations_allowed": true,
  "ip_header": "X-Real-IP",
  "job_poll_interval_ms": 30000,
  "log_file": null,
  "log_level": "debug",
  "log_timestamp_format": "%Y-%m-%d %H:%M:%S.%3f",
  "login_ratelimit_max_burst": 10,
  "login_ratelimit_seconds": 60,
  "org_attachment_limit": null,
  "org_creation_users": "",
  "org_events_enabled": false,
  "org_groups_enabled": false,
  "password_hints_allowed": true,
  "password_iterations": 600000,
  "reload_templates": false,
  "require_device_email": false,
  "rsa_key_filename": "/opt/vaultwarden/data/rsa_key",
  "send_purge_schedule": "0 5 * * * *",
  "sendmail_command": null,
  "sends_allowed": true,
  "sends_folder": "/opt/vaultwarden/data/sends",
  "show_password_hint": false,
  "signups_allowed": true,
  "signups_domains_whitelist": "",
  "signups_verify": false,
  "signups_verify_resend_limit": 6,
  "signups_verify_resend_time": 3600,
  "smtp_accept_invalid_certs": true,
  "smtp_accept_invalid_hostnames": true,
  "smtp_auth_mechanism": "Login",
  "smtp_debug": true,
  "smtp_embed_images": true,
  "smtp_explicit_tls": null,
  "smtp_from": "*****************",
  "smtp_from_name": "Vaultwarden",
  "smtp_host": "**************",
  "smtp_password": "***",
  "smtp_port": 465,
  "smtp_security": "force_tls",
  "smtp_ssl": null,
  "smtp_timeout": 15,
  "smtp_username": "*****************",
  "templates_folder": "/opt/vaultwarden/data/templates",
  "tmp_folder": "/opt/vaultwarden/data/tmp",
  "trash_auto_delete_days": null,
  "trash_purge_schedule": "0 5 0 * * *",
  "use_sendmail": false,
  "use_syslog": false,
  "user_attachment_limit": null,
  "web_vault_enabled": true,
  "web_vault_folder": "/opt/vaultwarden/web-vault",
  "websocket_address": "0.0.0.0",
  "websocket_enabled": false,
  "websocket_port": 3012,
  "yubico_client_id": null,
  "yubico_secret_key": null,
  "yubico_server": null
}

Debug:

Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.135][lettre::transport::smtp::client::async_connection][DEBUG] << 220 vla5-ea54f853bdd2.qloud-c.yandex.net (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru) 1678802526-62jVVfAbxeA1 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.135][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: EHLO vaultwarden 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.142][lettre::transport::smtp::client::async_connection][DEBUG] << 250-vla5-ea54f853bdd2.qloud-c.yandex.net 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.142][lettre::transport::smtp::client::async_connection][DEBUG] << 250-vla5-ea54f853bdd2.qloud-c.yandex.net 250-8BITMIME 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.142][lettre::transport::smtp::client::async_connection][DEBUG] << 250-vla5-ea54f853bdd2.qloud-c.yandex.net 250-8BITMIME 250-PIPELINING 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.143][lettre::transport::smtp::client::async_connection][DEBUG] << 250-vla5-ea54f853bdd2.qloud-c.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 53477376 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.143][lettre::transport::smtp::client::async_connection][DEBUG] << 250-vla5-ea54f853bdd2.qloud-c.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 53477376 250-STARTTLS 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.143][lettre::transport::smtp::client::async_connection][DEBUG] << 250-vla5-ea54f853bdd2.qloud-c.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 53477376 250-STARTTLS 250-AUTH LOGIN PLAIN XOAUTH2 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.143][lettre::transport::smtp::client::async_connection][DEBUG] << 250-vla5-ea54f853bdd2.qloud-c.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 53477376 250-STARTTLS 250-AUTH LOGIN PLAIN XOAUTH2 250-DSN 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.143][lettre::transport::smtp::client::async_connection][DEBUG] << 250-vla5-ea54f853bdd2.qloud-c.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 53477376 250-STARTTLS 250-AUTH LOGIN PLAIN XOAUTH2 250-DSN 250 ENHANCEDSTATUSCODES 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.143][lettre::transport::smtp::client::async_connection][DEBUG] server vla5-ea54f853bdd2.qloud-c.yandex.net with {Authentication(Login), Authentication(Xoauth2), EightBitMime, StartTls, Authentication(Plain)}
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.143][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: AUTH LOGIN 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.150][lettre::transport::smtp::client::async_connection][DEBUG] << 334 VXNlc*****
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.150][lettre::transport::smtp::commands][DEBUG] auth encoded challenge: VXNlc*****
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.150][lettre::transport::smtp::commands][DEBUG] auth decoded challenge: Username:
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.150][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: aW5mb0Bkcm*****
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.157][lettre::transport::smtp::client::async_connection][DEBUG] << 334 UGFzc***** 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.157][lettre::transport::smtp::commands][DEBUG] auth encoded challenge: UGFzc*****
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.157][lettre::transport::smtp::commands][DEBUG] auth decoded challenge: Password:
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.157][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: ZG5xcHNxZ***** 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.174][lettre::transport::smtp::client::async_connection][DEBUG] << 235 2.7.0 Authentication successful. 1678802526-62jVVfAbxeA1 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.174][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: MAIL FROM:<info@*******.**> 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.188][lettre::transport::smtp::client::async_connection][DEBUG] << 250 2.1.0 <info@*******.**> ok 1678802526-62jVVfAbxeA1-rVdrvL4b 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.188][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: RCPT TO:<pakhomov.dan@gmail.com> 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.196][lettre::transport::smtp::client::async_connection][DEBUG] << 250 2.1.5 <pakhomov.dan@gmail.com> recipient ok 1678802526-62jVVfAbxeA1-rVdrvL4b 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.196][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: DATA 
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.202][lettre::transport::smtp::client::async_connection][DEBUG] << 354 Start mail input, end with  .  
Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.203][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: Message-ID: <8f090d2b-b694-4fbf-a78b-8465e67d0f41@******.**>
    To: p******n@gmail.com
    From: Vaultwarden <info@*****.**>
    Subject: Verify Your Email
    MIME-Version: 1.0
    Date: Tue, 14 Mar 2023 14:02:06 +0000
    Content-Type: multipart/alternative;
    boundary="2jWB6Xpu6Sh8M5PzUZYzsin2i84DmDkKu2aHF8i2"

    --2jWB6Xpu6Sh8M5PzUZYzsin2i84DmDkKu2aHF8i2
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    Verify this email address for your account by clicking the link below.

    Verify Email Address Now: https://*******/#/verify-email/?userId=3D81*******

    If you did not request to verify your account, you can safely ignore this email.

    =3D=3D=3D
    Github: https://github.com/dani-garcia/vaultwarden
    --2jWB6Xpu6Sh8M5PzUZYzsin2i84DmDkKu2aHF8i2
    Content-Type: multipart/related;
    boundary="UYFVW6OJH8Qq0hvegfV4OroCKg9heXZJfILnHrlT"

    --UYFVW6OJH8Qq0hvegfV4OroCKg9heXZJfILnHrlT
    Content-Type: text/html; charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns=3D"http://www.w3.org/1999/xhtml" style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
    <head>
        <meta name=3D"viewport" content=3D"width=3Ddevice-width" />
        <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8" />
        <title>Vaultwarden</title>
    </head>
    <body style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; height: 100%; line-height: 25px; width: 100% !important;" bgcolor=3D"#f6f6f6">
        <style type=3D"text/css">
            body {
            margin: 0;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            box-sizing: border-box;
            font-size: 16px;
            color: #333;
            line-height: 25px;
            -webkit-font-smoothing: antialiased;
            -webkit-text-size-adjust: none;
            }
            body * {
            margin: 0;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            box-sizing: border-box;
            font-size: 16px;
            color: #333;
            line-height: 25px;
            -webkit-font-smoothing: antialiased;
            -webkit-text-size-adjust: none;
            }
            img {
            max-width: 100%;
            border: none;
            }
            body {
            -webkit-font-smoothing: antialiased;
            -webkit-text-size-adjust: none;
            width: 100% !important;
            height: 100%;
            line-height: 25px;
            }
            body {
            background-color: #f6f6f6;
            }
            @media only screen and (max-width: 600px) {
            body {
            padding: 0 !important;
            }
            .container {
            padding: 0 !important;
            width: 100% !important;
            }
            .container-table {
            padding: 0 !important;
            width: 100% !important;
            }
            .content {
            padding: 0 0 10px 0 !important;
            }
            .content-wrap {
            padding: 10px !important;
            }
            .invoice {
            width: 100% !important;
            }
            .main {
            border-right: none !important;
            border-left: none !important;
            border-radius: 0 !important;
            }
            .logo {
            padding-top: 10px !important;
            }
            .footer {
            margin-top: 10px !important;
            }
            .indented {
            padding-left: 10px;
            }
            }
        </style>
        <table class=3D"body-wrap" cellpadding=3D"0" cellspacing=3D"0" style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; width: 100%;" bgcolor=3D"#f6f6f6">
            <tr style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
                <td valign=3D"middle" class=3D"aligncenter middle logo" style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; padding: 20px 0 10px;" align=3D"center">
                    <img src=3D"cid:logo-gray.png" alt=3D"Vaultwarden" width=3D"190" height=3D"39" style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; border: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0; max-width: 100%;" />
                </td>
            </tr>
            <tr style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
                <td class=3D"container" align=3D"center" style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; clear: both !important; color: #333; display: block !important; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0 auto; max-width: 600px !important; width: 600px;" valign=3D"top">
                <table cellpadding=3D"0" cellspacing=3D"0" class=3D"container-table" style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; clear: both !important; color: #333; display: block !important; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0 auto; max-width: 600px !important; width: max-content;">
                    <tr style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; margin: 0;">
                        <td class=3D"content" align=3D"center" style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; box-sizing: border-box; color: #333; display:
                        Mar 14 17:02:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:06.203][lettre::transport::smtp::client::async_connection][DEBUG] Wrote:  . 
Mar 14 17:02:51 vaultwarden vaultwarden[1525]: [2023-03-14 17:02:51.611][vaultwarden::api::core::two_factor][DEBUG] Sending notifications for incomplete 2FA logins
Mar 14 17:03:21 vaultwarden vaultwarden[1525]: [2023-03-14 17:03:21.613][vaultwarden::api::core::emergency_access][DEBUG] Start emergency_notification_reminder_job
Mar 14 17:03:21 vaultwarden vaultwarden[1525]: [2023-03-14 17:03:21.614][vaultwarden::api::core::emergency_access][DEBUG] No emergency request reminder notification to send
Mar 14 17:03:51 vaultwarden vaultwarden[1525]: [2023-03-14 17:03:51.616][vaultwarden::api::core::two_factor][DEBUG] Sending notifications for incomplete 2FA logins
Mar 14 17:04:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:04:06.203][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: QUIT 
Mar 14 17:04:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:04:06.203][vaultwarden::mail][DEBUG] SMTP error: lettre::transport::smtp::Error {
Mar 14 17:04:06 vaultwarden vaultwarden[1525]:     kind: Response,
Mar 14 17:04:06 vaultwarden vaultwarden[1525]:     source: "incomplete response",
Mar 14 17:04:06 vaultwarden vaultwarden[1525]: }
Mar 14 17:04:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:04:06.203][vaultwarden::mail][ERROR] SMTP error: response error: incomplete response
Mar 14 17:04:06 vaultwarden vaultwarden[1525]: [2023-03-14 17:04:06.203][vaultwarden::api::core::accounts][ERROR] Error sending verify_email email: SMTP error: response error: incomplete response

How i can debug issue and fix it?

Hi Team, any suggestions?
Also i wrote to mail provider, and got answer that it is on application side :man_shrugging:

I don’t think this is a configuration issue of vaultwarden because the smtp configuration seems to work but then the generated mail is incomplete and also a bit wrong maybe. When I test it the length is limited to 76 characters per line, i.e.:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.=
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns=3D"http://www.w3.org/199=
9/xhtml" style=3D"-webkit-font-smoothing: antialiased; -webkit-text-size-ad=
just: none; box-sizing: border-box; color: #333; font-family: 'Helvetica Ne=
ue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; marg=
in: 0;">

Not sure why this happens or if this is the cause (or if this is expected behavior) but it might just be a bug in the lettre crate. Are you using a prebuilt version of vaultwarden or did you compile it yourself?

This was a problem previously, but fixed for a long time already.
Maybe there is a corner case trigger here?

Yeh, compile it myself.

Sorry, what you mean?

Any idea how to fix this issue?

On what OS did you build it. Which Rust version?
Did you make any changes?

What happens if you use a docker image with the same settings?

Debian 11.6
rustc 1.68.0 (2c8cc3432 2023-03-06)

No, just :

git clone https://github.com/dani-garcia/vaultwarden
cd vaultwarden
cargo build --features "sqlite,mysql,postgresql" --release

i did not try docker image, i’m not good with it :frowning:

Could you try this pre-built binary then? Merge pull request #3366 from BlackDex/some-fixes · dani-garcia/vaultwarden@813e889 · GitHub

Same error :frowning:
image

Mar 26 00:09:50 vaultwarden vaultwarden[2441]: [2023-03-26 00:09:50.773][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: <CRLF>.<CRLF>
Mar 26 00:09:57 vaultwarden vaultwarden[2441]: [2023-03-26 00:09:57.237][vaultwarden::api::core::two_factor][DEBUG] Sending notifications for incomplete 2FA logins
Mar 26 00:09:58 vaultwarden vaultwarden[2441]: [2023-03-26 00:09:58.871][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: QUIT<CRLF>
Mar 26 00:09:58 vaultwarden vaultwarden[2441]: [2023-03-26 00:09:58.871][vaultwarden::mail][DEBUG] SMTP error: lettre::transport::smtp::Error {
Mar 26 00:09:58 vaultwarden vaultwarden[2441]:     kind: Response,
Mar 26 00:09:58 vaultwarden vaultwarden[2441]:     source: "incomplete response",
Mar 26 00:09:58 vaultwarden vaultwarden[2441]: }
Mar 26 00:09:58 vaultwarden vaultwarden[2441]: [2023-03-26 00:09:58.871][vaultwarden::mail][ERROR] SMTP error: response error: incomplete response
Mar 26 00:09:58 vaultwarden vaultwarden[2441]: [2023-03-26 00:09:58.871][response][INFO] (test_smtp) POST /admin/test/smtp => 400 Bad Request
Mar 26 00:09:58 vaultwarden vaultwarden[2441]: [2023-03-26 00:09:58.871][rocket::server::_][WARN] Remote left: client disconnect before response started.

Could you try any other smtp server?
Like sendgrid or something else?

Just check Gmail and it works!

Mar 26 12:31:51 vaultwarden vaultwarden[2441]: [2023-03-26 12:31:51.999][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: <CRLF>.<CRLF>
Mar 26 12:31:52 vaultwarden vaultwarden[2441]: [2023-03-26 12:31:52.885][lettre::transport::smtp::client::async_connection][DEBUG] << 250 2.0.0 OK  1679823112 z12-20020ac24f8c000000b004ddef915fe4sm4151515lfs.274 - gsmtp<CRLF>
Mar 26 12:31:52 vaultwarden vaultwarden[2441]: [2023-03-26 12:31:52.885][lettre::transport::smtp::client::async_connection][DEBUG] Wrote: QUIT<CRLF>
Mar 26 12:31:52 vaultwarden vaultwarden[2441]: [2023-03-26 12:31:52.974][lettre::transport::smtp::client::async_connection][DEBUG] << 221 2.0.0 closing connection z12-20020ac24f8c000000b004ddef915fe4sm4151515lfs.274 - gsmtp<CRLF>
Mar 26 12:31:52 vaultwarden vaultwarden[2441]: [2023-03-26 12:31:52.974][response][INFO] (test_smtp) POST /admin/test/smtp => 200 OK
Mar 26 12:31:58 vaultwarden vaultwarden[2441]: [2023-03-26 12:31:58.937][vaultwarden::api::core::two_factor][DEBUG] Sending notifications for incomplete 2FA logins

So problem with my mail smtp service provider, may be we have some workaround to start working with yandex mail ?

So no chance to make yandex mail works with VaultWarden? :frowning:

Not sure if this is the fault of your mail server, a bug in vaultwarden or lettre or just a weird usage/configuration bug. :person_shrugging:

Out of curiosity what happens if you set smtp_accept_invalid_certs and smtp_accept_invalid_hostnames to false instead of true?

Maybe you could try to send a test mail with your mail server using one of the examples (e.g. smtp_tls.rs) from the lettre crate (and with a longer string than "Be happy!") and see if that works)?

Thanks for suggestion, but set both options to false nothing changes.

I was trying to send 2FA confirmation email too, same issue.

Did you try the example from the lettre crate? Because if so it might be a bug in the lettre crate. Maybe they can help you find the issue?

i see lettre was recently updated - Releases · lettre/lettre · GitHub how i can update it?
or just recompile vaultwarden?

Use the latest version of Vaultwarden.

Updated but still not working :frowning:

I’m afraid that this is not something we can fix on our side.
For one, if, then it probably is an issue on the lettre side if it even is client side.
Second, if other servers do seem to work, it probably is a server side issue, or maybe your ISP does something strange, like DPI and causing some package timing issues?

Also, i see there is an issue report at lettere regarding the same: Send mail with gmail smtp server, got error Error { kind: Response, source: "incomplete response" } · Issue #866 · lettre/lettre · GitHub but there they mentioned gmail as being an issue. Might be wise to mention your use-case also.