[GH-ISSUE #356] SMTP AUTH PLAIN value is not sent correctly #204

Closed
opened 2026-03-03 01:26:37 +03:00 by kerem · 13 comments
Owner

Originally created by @goooseman on GitHub (Jan 21, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/356

I have a problem with emails not being sent using SMTP, because of AUTH PLAIN value is not sent correctly.
I am using mailgun SMTP server to send emails using SSL with latest docker image of Bitwarden_rs server.

My email env vars are the following: (of course username and password are not real)

SMTP_HOST: 'smtp.mailgun.org'
SMTP_FROM: 'bitwarden@trucknet.io'
SMTP_PORT: '587'
SMTP_SSL: 'true'
SMTP_USERNAME: 'test@test.com'
SMTP_PASSWORD: '12345678'

The logs :

 [2019-01-21 17:25:22][lettre::smtp::client][DEBUG] connecting to 35.172.4.119:587
[2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Read: 220 ak47 ESMTP ready<CRLF>
[2019-01-21 17:25:23][lettre::smtp][INFO] connection established to 35.172.4.119:587
[2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Wrote: EHLO bitwarden-0<CRLF>
[2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Read: 250-ak47<CRLF>250-AUTH PLAIN LOGIN<CRLF>250-SIZE 52428800<CRLF>250-8BITMIME<CRLF>250-ENHANCEDSTATUSCODES<CRLF>250-SMTPUTF8<CRLF>250 STARTTLS<CRLF>
[2019-01-21 17:25:23][lettre::smtp][DEBUG] server ak47 with {SmtpUtfEight, Authentication(Login), Authentication(Plain), StartTls, EightBitMime}
[2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Wrote: STARTTLS<CRLF>
[2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Read: 220 2.0.0 Start TLS<CRLF>
[2019-01-21 17:25:23][lettre::smtp][DEBUG] connection encrypted
[2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Wrote: EHLO bitwarden-0<CRLF>
[2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Read: 250-ak47<CRLF>250-AUTH PLAIN LOGIN<CRLF>250-SIZE 52428800<CRLF>250-8BITMIME<CRLF>250-ENHANCEDSTATUSCODES<CRLF>250 SMTPUTF8<CRLF>
[2019-01-21 17:25:23][lettre::smtp][DEBUG] server ak47 with {EightBitMime, Authentication(Plain), SmtpUtfEight, Authentication(Login)}
[2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Wrote: AUTH PLAIN AHRlc3RAdGVzdC5jb20KADEyMzQ1Njc4Cg==<CRLF>
[2019-01-21 17:25:24][lettre::smtp::client][DEBUG] Read: 535 5.7.0 Mailgun is not loving your login or password<CRLF>
[2019-01-21 17:25:24][lettre::smtp::client][DEBUG] Wrote: QUIT<CRLF>
[2019-01-21 17:25:24][lettre::smtp::client][DEBUG] Read: 221 2.0.0 Bye<CRLF>
[2019-01-21 17:25:24][bitwarden_rs::error][ERROR] Error sending email. 5.7.0 Mailgun is not loving your login or password 

The problem is how Bitwarden server (or letter library) is generating the AUTH PLAIN value.

Let's say, we have those credentials:
Username: test@test.com
Password: 12345678

AUTH PLAIN is username + password in base64 format
So the result should be dGVzdEB0ZXN0LmNvbTEyMzQ1Njc4Cg== (echo test@test.com12345678 | base64)
But Bitwarden is sending AHRlc3RAdGVzdC5jb20KADEyMzQ1Njc4Cg==. If we decode it, we get the following:

test@test.com
12345678

So the difference is a line break. I have not found any AUTH PLAIN specification with a line break between username and password.

Does SMTP works for somebody?
And how this issue can be fixed?

I've looked at the mail.rs source file and I see that we are using lettre library to send emails.
But the library should work OK, I have found a working code with this library and Mailgun SMTP, but it uses SmtpTransportBuilder instead of SmtpClient.

Or maybe the problem can be how we parse the env vars?

I am completely new to Rust so I do not know how can I debug this problem more.

Originally created by @goooseman on GitHub (Jan 21, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/356 I have a problem with emails not being sent using SMTP, because of AUTH PLAIN value is not sent correctly. I am using mailgun SMTP server to send emails using SSL with latest docker image of Bitwarden_rs server. My email env vars are the following: (of course username and password are not real) ``` SMTP_HOST: 'smtp.mailgun.org' SMTP_FROM: 'bitwarden@trucknet.io' SMTP_PORT: '587' SMTP_SSL: 'true' SMTP_USERNAME: 'test@test.com' SMTP_PASSWORD: '12345678' ``` The logs : ``` [2019-01-21 17:25:22][lettre::smtp::client][DEBUG] connecting to 35.172.4.119:587 [2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Read: 220 ak47 ESMTP ready<CRLF> [2019-01-21 17:25:23][lettre::smtp][INFO] connection established to 35.172.4.119:587 [2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Wrote: EHLO bitwarden-0<CRLF> [2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Read: 250-ak47<CRLF>250-AUTH PLAIN LOGIN<CRLF>250-SIZE 52428800<CRLF>250-8BITMIME<CRLF>250-ENHANCEDSTATUSCODES<CRLF>250-SMTPUTF8<CRLF>250 STARTTLS<CRLF> [2019-01-21 17:25:23][lettre::smtp][DEBUG] server ak47 with {SmtpUtfEight, Authentication(Login), Authentication(Plain), StartTls, EightBitMime} [2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Wrote: STARTTLS<CRLF> [2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Read: 220 2.0.0 Start TLS<CRLF> [2019-01-21 17:25:23][lettre::smtp][DEBUG] connection encrypted [2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Wrote: EHLO bitwarden-0<CRLF> [2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Read: 250-ak47<CRLF>250-AUTH PLAIN LOGIN<CRLF>250-SIZE 52428800<CRLF>250-8BITMIME<CRLF>250-ENHANCEDSTATUSCODES<CRLF>250 SMTPUTF8<CRLF> [2019-01-21 17:25:23][lettre::smtp][DEBUG] server ak47 with {EightBitMime, Authentication(Plain), SmtpUtfEight, Authentication(Login)} [2019-01-21 17:25:23][lettre::smtp::client][DEBUG] Wrote: AUTH PLAIN AHRlc3RAdGVzdC5jb20KADEyMzQ1Njc4Cg==<CRLF> [2019-01-21 17:25:24][lettre::smtp::client][DEBUG] Read: 535 5.7.0 Mailgun is not loving your login or password<CRLF> [2019-01-21 17:25:24][lettre::smtp::client][DEBUG] Wrote: QUIT<CRLF> [2019-01-21 17:25:24][lettre::smtp::client][DEBUG] Read: 221 2.0.0 Bye<CRLF> [2019-01-21 17:25:24][bitwarden_rs::error][ERROR] Error sending email. 5.7.0 Mailgun is not loving your login or password ``` The problem is how Bitwarden server (or `letter` library) is generating the `AUTH PLAIN` value. Let's say, we have those credentials: Username: test@test.com Password: 12345678 AUTH PLAIN is username + password in base64 format So the result should be `dGVzdEB0ZXN0LmNvbTEyMzQ1Njc4Cg==` (`echo test@test.com12345678 | base64`) But Bitwarden is sending `AHRlc3RAdGVzdC5jb20KADEyMzQ1Njc4Cg==`. If we decode it, we get the following: ``` test@test.com 12345678 ``` So the difference is a line break. I have not found any AUTH PLAIN specification with a line break between username and password. Does SMTP works for somebody? And how this issue can be fixed? I've looked at the `mail.rs` source file and I see that we are using `lettre` library to send emails. But the library should work OK, I have found a [working code](https://github.com/natboehm/rust-email-sender/blob/master/src/main.rs) with this library and Mailgun SMTP, but it uses `SmtpTransportBuilder` instead of `SmtpClient`. Or maybe the problem can be how we parse the env vars? I am completely new to Rust so I do not know how can I debug this problem more.
kerem closed this issue 2026-03-03 01:26:38 +03:00
Author
Owner

@goooseman commented on GitHub (Jan 21, 2019):

Strange, but it works with Gmail server ok. I mean the issue is still exists, just some SMTP servers works ok with username and password separated by a new line, and some not.

<!-- gh-comment-id:456151202 --> @goooseman commented on GitHub (Jan 21, 2019): Strange, but it works with Gmail server ok. I mean the issue is still exists, just some SMTP servers works ok with username and password separated by a new line, and some not.
Author
Owner

@dani-garcia commented on GitHub (Jan 21, 2019):

That's interesting.

The SmtpTransportBuilder vs SmtpClient issue was due to a refactor in lettre, so that shouldn't be the problem.

Looking through lettre's credentials impl, they don't add a new line, but a null character first and between them it seems: https://github.com/lettre/lettre/blob/master/lettre/src/smtp/authentication.rs#L100

You can replace the block in https://github.com/dani-garcia/bitwarden_rs/blob/master/src/mail.rs#L27 with somethting like this:

let smtp_client = match (&config.smtp_username, &config.smtp_password) {
        (Some(user), Some(pass)) => {
            println!("|{}|{}|", user, pass);
            smtp_client.credentials(Credentials::new(user.clone(), pass.clone()))
        },
        _ => smtp_client,
};

And that should print something like |test@test.com|12345678| if the newline is caused by the config or by lettre.

I'll try to test this in a day or two if you can't get to it by then.

<!-- gh-comment-id:456185205 --> @dani-garcia commented on GitHub (Jan 21, 2019): That's interesting. The `SmtpTransportBuilder` vs `SmtpClient` issue was due to a refactor in lettre, so that shouldn't be the problem. Looking through lettre's credentials impl, they don't add a new line, but a null character first and between them it seems: https://github.com/lettre/lettre/blob/master/lettre/src/smtp/authentication.rs#L100 You can replace the block in https://github.com/dani-garcia/bitwarden_rs/blob/master/src/mail.rs#L27 with somethting like this: ```rust let smtp_client = match (&config.smtp_username, &config.smtp_password) { (Some(user), Some(pass)) => { println!("|{}|{}|", user, pass); smtp_client.credentials(Credentials::new(user.clone(), pass.clone())) }, _ => smtp_client, }; ``` And that should print something like `|test@test.com|12345678|` if the newline is caused by the config or by lettre. I'll try to test this in a day or two if you can't get to it by then.
Author
Owner

@goooseman commented on GitHub (Jan 22, 2019):

Thanks for the reply,

It took some time for me to set up a local rust environment on my machine.

But I succeded and here is the ouput: |test@test.com|12345678|.

So the problem is in lettre library. Does bitwarden_rs use the latest version?
If yes, should I open an issue there?

Strange thing, that lettre works ok with mailgun, but using SmtpTransportBuilder class.

<!-- gh-comment-id:456418052 --> @goooseman commented on GitHub (Jan 22, 2019): Thanks for the reply, It took some time for me to set up a local rust environment on my machine. But I succeded and here is the ouput: `|test@test.com|12345678|`. So the problem is in lettre library. Does bitwarden_rs use the latest version? If yes, should I open an issue there? Strange thing, that lettre works ok with mailgun, but using `SmtpTransportBuilder` class.
Author
Owner

@dani-garcia commented on GitHub (Jan 22, 2019):

Can you try to run this one:

#Cargo.toml

[package]
name = "confirm_email"
version = "0.1.0"
authors = ["Natalie Boehm <nmb56@pitt.edu>"]

[dependencies]
dotenv = "0.10.1"
lettre = "0.9"
lettre_email = "0.9"
native-tls = "0.2"

[patch.crates-io]
# Use new native_tls version 0.2
lettre = { git = 'https://github.com/lettre/lettre', rev = 'c988b1760ad81' }
lettre_email = { git = 'https://github.com/lettre/lettre', rev = 'c988b1760ad81' }
#main.rs

extern crate dotenv;
extern crate lettre;
extern crate lettre_email;
extern crate native_tls;

use dotenv::dotenv;
use std::env;

use lettre::smtp::authentication::{Credentials, Mechanism};
use lettre::smtp::SUBMISSION_PORT;
use lettre::{ClientSecurity, ClientTlsParameters, SmtpClient, Transport};
use lettre_email::EmailBuilder;
use native_tls::{Protocol, TlsConnector};

fn main() {
    dotenv().ok();

    let mailgun_username = env::var("MAILGUN_SMTP_LOGIN").unwrap();
    let mailgun_password = env::var("MAILGUN_SMTP_PASSWORD").unwrap();
    let mailgun_server = env::var("MAILGUN_SMTP_SERVER").unwrap();

    let email = EmailBuilder::new()
        .to("something@example.com")
        .from(mailgun_username.as_str())
        .subject("hello friend")
        .body("greetings")
        .build()
        .expect("Failed to build message");

    let tls = TlsConnector::builder()
        .min_protocol_version(Some(Protocol::Tlsv11))
        .build()
        .unwrap();

    let cs = ClientSecurity::Required(ClientTlsParameters::new(mailgun_server.clone(), tls));

    let mut transport = SmtpClient::new((mailgun_server.as_str(), SUBMISSION_PORT), cs)
        .expect("Failed to create transport")
        .credentials(Credentials::new(mailgun_username, mailgun_password))
        .smtp_utf8(true)
        .authentication_mechanism(Mechanism::Plain)
        .transport();

    transport.send(email.into()).ok();
}

It's basically doing the exact same thing that the code that works for you, but using the newer version with the newer API. If that still doesn't work, then you can probably report this upstream, but the Lettre project doesn't seem to be actively maintained, so I'm not sure if you'll get a response.

Worst case, we could migrate to another email library like this one, which seems more actively maintained, but it's also quite less known: https://crates.io/crates/mail

<!-- gh-comment-id:456476761 --> @dani-garcia commented on GitHub (Jan 22, 2019): Can you try to run this one: ```toml #Cargo.toml [package] name = "confirm_email" version = "0.1.0" authors = ["Natalie Boehm <nmb56@pitt.edu>"] [dependencies] dotenv = "0.10.1" lettre = "0.9" lettre_email = "0.9" native-tls = "0.2" [patch.crates-io] # Use new native_tls version 0.2 lettre = { git = 'https://github.com/lettre/lettre', rev = 'c988b1760ad81' } lettre_email = { git = 'https://github.com/lettre/lettre', rev = 'c988b1760ad81' } ``` ```rust #main.rs extern crate dotenv; extern crate lettre; extern crate lettre_email; extern crate native_tls; use dotenv::dotenv; use std::env; use lettre::smtp::authentication::{Credentials, Mechanism}; use lettre::smtp::SUBMISSION_PORT; use lettre::{ClientSecurity, ClientTlsParameters, SmtpClient, Transport}; use lettre_email::EmailBuilder; use native_tls::{Protocol, TlsConnector}; fn main() { dotenv().ok(); let mailgun_username = env::var("MAILGUN_SMTP_LOGIN").unwrap(); let mailgun_password = env::var("MAILGUN_SMTP_PASSWORD").unwrap(); let mailgun_server = env::var("MAILGUN_SMTP_SERVER").unwrap(); let email = EmailBuilder::new() .to("something@example.com") .from(mailgun_username.as_str()) .subject("hello friend") .body("greetings") .build() .expect("Failed to build message"); let tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv11)) .build() .unwrap(); let cs = ClientSecurity::Required(ClientTlsParameters::new(mailgun_server.clone(), tls)); let mut transport = SmtpClient::new((mailgun_server.as_str(), SUBMISSION_PORT), cs) .expect("Failed to create transport") .credentials(Credentials::new(mailgun_username, mailgun_password)) .smtp_utf8(true) .authentication_mechanism(Mechanism::Plain) .transport(); transport.send(email.into()).ok(); } ``` It's basically doing the exact same thing that the code that works for you, but using the newer version with the newer API. If that still doesn't work, then you can probably report this upstream, but the Lettre project doesn't seem to be actively maintained, so I'm not sure if you'll get a response. Worst case, we could migrate to another email library like this one, which seems more actively maintained, but it's also quite less known: https://crates.io/crates/mail
Author
Owner

@goooseman commented on GitHub (Jan 22, 2019):

Hi, thank you for an example.

I've tried the code and it works perfectly. Got an email to my mailbox.

<!-- gh-comment-id:456489864 --> @goooseman commented on GitHub (Jan 22, 2019): Hi, thank you for an example. I've tried the code and it works perfectly. Got an email to my mailbox.
Author
Owner

@dani-garcia commented on GitHub (Jan 22, 2019):

That's interesting, can you try if it works without the line .authentication_mechanism(Mechanism::Plain)?

Right now we aren't specifying that, but as far as I know lettre uses Plain by default.

The only other difference is that we disable connection reuse, but that shouldn't affect this.

<!-- gh-comment-id:456492318 --> @dani-garcia commented on GitHub (Jan 22, 2019): That's interesting, can you try if it works without the line `.authentication_mechanism(Mechanism::Plain)`? Right now we aren't specifying that, but as far as I know lettre uses Plain by default. The only other difference is that we disable connection reuse, but that shouldn't affect this.
Author
Owner

@goooseman commented on GitHub (Jan 22, 2019):

Yep, it works without authentication_mechanism.

I was trying to turn on debug for lettre to see what exactly does it send as AUTH PLAIN, but did not figure out how to it.

But anyway, it works.

<!-- gh-comment-id:456493023 --> @goooseman commented on GitHub (Jan 22, 2019): Yep, it works without `authentication_mechanism`. I was trying to turn on debug for lettre to see what exactly does it send as `AUTH PLAIN`, but did not figure out how to it. But anyway, it works.
Author
Owner

@dani-garcia commented on GitHub (Jan 22, 2019):

The only other differences that I can see between that code and what we are doing are:

The connection reuse thing:
Add .connection_reuse(ConnectionReuseParameters::NoReuse) in place of the authentication_mechanism and add use lettre::smtp::ConnectionReuseParameters; after the other uses.

We are also using a different from() when building the email:
Change it to .from((mailgun_username.as_str(), "Your Name"))

You could test if changing those two things does anything, but I can't imagine how that could be related

<!-- gh-comment-id:456498095 --> @dani-garcia commented on GitHub (Jan 22, 2019): The only other differences that I can see between that code and what we are doing are: The connection reuse thing: Add ` .connection_reuse(ConnectionReuseParameters::NoReuse)` in place of the `authentication_mechanism` and add `use lettre::smtp::ConnectionReuseParameters;` after the other uses. We are also using a different `from()` when building the email: Change it to `.from((mailgun_username.as_str(), "Your Name"))` You could test if changing those two things does anything, but I can't imagine how that could be related
Author
Owner

@goooseman commented on GitHub (Jan 22, 2019):

.from() method take only 1 parameter, so I get an error, when using 2:

screen shot 2019-01-22 at 20 13 48

But I've tried to make all other modifications, and I still get an email.

Just for the reference, my final code looks like this:

extern crate dotenv;
extern crate lettre;
extern crate lettre_email;
extern crate native_tls;

use dotenv::dotenv;
use std::env;

use lettre::smtp::authentication::{Credentials};
use lettre::smtp::SUBMISSION_PORT;
use lettre::{ClientSecurity, ClientTlsParameters, SmtpClient, Transport};
use lettre_email::EmailBuilder;
use native_tls::{Protocol, TlsConnector};
use lettre::smtp::ConnectionReuseParameters;

fn main() {
    dotenv().ok();

    let mailgun_username = env::var("MAILGUN_SMTP_LOGIN").unwrap();
    let mailgun_password = env::var("MAILGUN_SMTP_PASSWORD").unwrap();
    let mailgun_server = env::var("MAILGUN_SMTP_SERVER").unwrap();

    let email = EmailBuilder::new()
        .to("xxx@gmail.com")
        .from(mailgun_username.as_str())
        .subject("hello friend")
        .body("greetings")
        .build()
        .expect("Failed to build message");

    let tls = TlsConnector::builder()
        .min_protocol_version(Some(Protocol::Tlsv11))
        .build()
        .unwrap();

    let cs = ClientSecurity::Required(ClientTlsParameters::new(mailgun_server.clone(), tls));

    let mut transport = SmtpClient::new((mailgun_server.as_str(), SUBMISSION_PORT), cs)
        .expect("Failed to create transport")
        .credentials(Credentials::new(mailgun_username, mailgun_password))
        .smtp_utf8(true)
        .connection_reuse(ConnectionReuseParameters::NoReuse)
        .transport();

    transport.send(email.into()).ok();
}

Can it be just the lettre version?

UPD: I see, that it is the same lettre version. Really weird.
How can I debug what is lettre sending now?

<!-- gh-comment-id:456505116 --> @goooseman commented on GitHub (Jan 22, 2019): `.from()` method take only 1 parameter, so I get an error, when using 2: <img width="659" alt="screen shot 2019-01-22 at 20 13 48" src="https://user-images.githubusercontent.com/3503252/51556216-3c6f0000-1e82-11e9-876d-5097f0949ffd.png"> But I've tried to make all other modifications, and I still get an email. Just for the reference, my final code looks like this: ``` extern crate dotenv; extern crate lettre; extern crate lettre_email; extern crate native_tls; use dotenv::dotenv; use std::env; use lettre::smtp::authentication::{Credentials}; use lettre::smtp::SUBMISSION_PORT; use lettre::{ClientSecurity, ClientTlsParameters, SmtpClient, Transport}; use lettre_email::EmailBuilder; use native_tls::{Protocol, TlsConnector}; use lettre::smtp::ConnectionReuseParameters; fn main() { dotenv().ok(); let mailgun_username = env::var("MAILGUN_SMTP_LOGIN").unwrap(); let mailgun_password = env::var("MAILGUN_SMTP_PASSWORD").unwrap(); let mailgun_server = env::var("MAILGUN_SMTP_SERVER").unwrap(); let email = EmailBuilder::new() .to("xxx@gmail.com") .from(mailgun_username.as_str()) .subject("hello friend") .body("greetings") .build() .expect("Failed to build message"); let tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv11)) .build() .unwrap(); let cs = ClientSecurity::Required(ClientTlsParameters::new(mailgun_server.clone(), tls)); let mut transport = SmtpClient::new((mailgun_server.as_str(), SUBMISSION_PORT), cs) .expect("Failed to create transport") .credentials(Credentials::new(mailgun_username, mailgun_password)) .smtp_utf8(true) .connection_reuse(ConnectionReuseParameters::NoReuse) .transport(); transport.send(email.into()).ok(); } ``` Can it be just the lettre version? UPD: I see, that it is the same lettre version. Really weird. How can I debug what is lettre sending now?
Author
Owner

@dani-garcia commented on GitHub (Jan 22, 2019):

The from needs two parenthesis, it's not two parameters, but one tuple with two values: from( (a, b) )

The lettre version that I put in the example above is the same one that we are currently using, which is the latest commit in the lettre repo.

About edit: The logs already print everything that there is to show, you could use a debugger to follow the code step by step or you could clone lettre and add extra debug prints before the error occurs to try to locate the cause.

<!-- gh-comment-id:456510388 --> @dani-garcia commented on GitHub (Jan 22, 2019): The from needs two parenthesis, it's not two parameters, but one tuple with two values: `from( (a, b) )` The lettre version that I put in the example above is the same one that we are currently using, which is the latest commit in the lettre repo. About edit: The logs already print everything that there is to show, you could use a debugger to follow the code step by step or you could clone lettre and add extra debug prints before the error occurs to try to locate the cause.
Author
Owner

@goooseman commented on GitHub (Jan 22, 2019):

Ooook, found smth interesting...
I've tried to send a real email from bitwarden_rs locally.
Sorry, did not try before locally.
And it works!

So the issue is only reproducible in my K8S cluster using mprasil/bitwarden:latest docker image.
I will do more tests tomorrow from the cluster. But this is really weird.

<!-- gh-comment-id:456511270 --> @goooseman commented on GitHub (Jan 22, 2019): Ooook, found smth interesting... I've tried to send a real email from bitwarden_rs locally. Sorry, did not try before locally. And it works! So the issue is only reproducible in my K8S cluster using `mprasil/bitwarden:latest` docker image. I will do more tests tomorrow from the cluster. But this is really weird.
Author
Owner

@goooseman commented on GitHub (Jan 22, 2019):

Ok, I confirm.

Bitwarden_rs running locally generates a correct AUTH PLAIN string without line break, if decoded from base64.
Bitwarden_rs running in K8S cluster generates not a correct AUTH PLAIN string without line break, if decoded from base64.

But with Gmail it works OK even in K8S cluster, but there is a line break in the AUTH PLAIN string.

<!-- gh-comment-id:456514857 --> @goooseman commented on GitHub (Jan 22, 2019): Ok, I confirm. Bitwarden_rs running locally generates a correct `AUTH PLAIN` string without line break, if decoded from base64. Bitwarden_rs running in K8S cluster generates not a correct `AUTH PLAIN` string without line break, if decoded from base64. But with Gmail it works OK even in K8S cluster, but there is a line break in the `AUTH PLAIN` string.
Author
Owner

@goooseman commented on GitHub (Jan 22, 2019):

Ok, now I see. It is how I encode to base64.
Do not use echo smth | base64

<!-- gh-comment-id:456517871 --> @goooseman commented on GitHub (Jan 22, 2019): Ok, now I see. It is how I encode to base64. Do not use `echo smth | base64`
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/vaultwarden#204
No description provided.