Open Apashh opened 11 months ago
you can not access web console?
Access is ok ! But when it send 2FA Code via e-mail, i have no e-mail recieve.. So i would like to disable 2FA without acess to web console 😉
Not working for you?
I upgraded from version 1.1.9 to version 1.1.10-3. I had SMTP in the old version which worked well. Today, I no longer receive anything. I would like to deactivate 2FA without entering the WEB console. Can we do this via SQLite? or another solution?
We did have back compatibility test for this, but maybe we missed something.
Yes, please backup all db files first, db.sqlite3
and db.sqlite3-*
files first.
then you can run sqlite3 db.sqlite3
with below sql.
update user set info=json_remove(info, '$.email_verification') where name='test';
please change 'test' to your name.
But in the web console after you logged in, you will still see. You can tick it off and update.
@dignow this is what I worried most, back compatibility. FIX this ASAP. No matter what changes we do, this is the most important thing.
I'm failed to reproduce this issue.
db.sqlite3
.1.1.9
.1.1.10-3
.I can receive the email after Step 7.
@Apashh Which type of email did you want to send?
Another user also reported this via sales@rustdesk.com
I've tried 1.1.8 -> 1.1.10-3 and 1.1.9 -> 1.1.10-3. Sending email 2FA code works fine when login.
I guess they have different settings which we do not have in our test. Let's wait for their reply.
We did have back compatibility test for this, but maybe we missed something.
Yes, please backup all db files first,
db.sqlite3
anddb.sqlite3-*
files first. then you can runsqlite3 db.sqlite3
with below sql.update user set info=json_remove(info, '$.email_verification') where name='test';
please change 'test' to your name.But in the web console after you logged in, you will still see. You can tick it off and update.
I made the commands and accessed the console again but 2FA did not work. In the SMTP settings, I validate the settings (I use the same on other applications), the console tells me that everything is good, I enter an email address for tester but I receive nothing (even in spam) .
@Apashh Thanks for your feedback.
What's the test result message?
@Apashh Thanks for your feedback.
What's the test result message?
No message when click on submit and test :
Does ssl0.ovh.net
require payment? I'm failed to register the email.
But it's strange that there's no reply. Can you try a wrong password?
Est-ce
ssl0.ovh.net
qu'il faut payer ? Je n'ai pas réussi à enregistrer l'e-mail.Mais c'est étrange qu'il n'y ait pas de réponse. Pouvez-vous essayer un mauvais mot de passe ?
ase.mp4
I have an error :
But if password is good, no message appear and no message recieve in inbox
Have you input the receiver email here? If empty no test email will be sent, only updates will be made.
Have you input the receiver email here? If empty no test email will be sent, only updates will be made.
Yep the reciever its not empty :)
I'm not clear of what you said.
Do you mean the receiver email is not empty, you have set the receiver email and then click "OK"?
If so, can you please run a rust test? Sorry for the inconvenience, but I cannot find out the reason if the message is empty while the receiver email is set.
https://crates.io/crates/lettre
use lettre::message::header::ContentType;
use lettre::transport::smtp::authentication::Credentials;
use lettre::{Message, SmtpTransport, Transport};
fn main() {
let email = Message::builder()
.from("NoBody <nobody@domain.tld>".parse().unwrap())
.reply_to("Yuin <yuin@domain.tld>".parse().unwrap())
.to("Hei <hei@domain.tld>".parse().unwrap())
.subject("Happy new year")
.header(ContentType::TEXT_PLAIN)
.body(String::from("Be happy!"))
.unwrap();
let creds = Credentials::new("smtp_username".to_owned(), "smtp_password".to_owned());
let mailer = SmtpTransport::starttls_relay("smtp.gmail.com")
.unwrap()
.credentials(creds)
.port(587)
.build();
match mailer.send(&email) {
Ok(r) => println!(
"Email sent successfully: {}, {:?}",
r.code(),
r.message().collect::<Vec<&str>>()
),
Err(e) => panic!("Could not send email: {:?}", e),
}
}
I'm not clear of what you said.
Do you mean the receiver email is not empty, you have set the receiver email and then click "OK"?
If so, can you please run a rust test? Sorry for the inconvenience, but I cannot find out the reason if the message is empty while the receiver email is set.
https://crates.io/crates/lettre
use lettre::message::header::ContentType; use lettre::transport::smtp::authentication::Credentials; use lettre::{Message, SmtpTransport, Transport}; fn main() { let email = Message::builder() .from("NoBody <nobody@domain.tld>".parse().unwrap()) .reply_to("Yuin <yuin@domain.tld>".parse().unwrap()) .to("Hei <hei@domain.tld>".parse().unwrap()) .subject("Happy new year") .header(ContentType::TEXT_PLAIN) .body(String::from("Be happy!")) .unwrap(); let creds = Credentials::new("smtp_username".to_owned(), "smtp_password".to_owned()); let mailer = SmtpTransport::starttls_relay("smtp.gmail.com") .unwrap() .credentials(creds) .port(587) .build(); match mailer.send(&email) { Ok(r) => println!( "Email sent successfully: {}, {:?}", r.code(), r.message().collect::<Vec<&str>>() ), Err(e) => panic!("Could not send email: {:?}", e), } }
Yep I have set the reciever and click on OK but nothing ... How run rust test ?
What OS do you use? Can you run my executable file?
I've attached my files here. Please run in the terminal.
If you use linux or macos, please run chmod +x simple_test_<linux|macos>
first.
This test app uses native-tls
.
The test app in https://github.com/rustdesk/rustdesk-server-pro/issues/99#issuecomment-1775326168 uses tokio1-rustls-tls
.
What OS do you use? Can you run my executable file?
I've attached my files here. Please run in the terminal.
If you use linux or macos, please run
chmod +x simple_test_<linux|macos>
first.
Hello, i have test it and error :
How add option starttls or ssl option with port 587 or 465 ?
My command :
./simple_test_linux -f address@domain.com -p Password -P 25/587/465 -s ssl0.ovh.net -t address_to@domain.com -u address@domain.com
Add -S
will set starttls
to be true.
The port is set by -P
.
./simple_test_linux -S -P 587 ...
Email recieve perfectly with same option of web console
Thanks. I need to double check the code.
Have you restarted the server, except for the upgrade?
Can you please try restart the server?
I find a problem that the same email configuration may not trigger the send actions (if initialization fails).
hbbr and hbbs restarted, smtp test and same, no mail, no message on webconsole...
Thanks @Apashh
Can you see that the update operation was successful?
@Apashh Can you please try again this test on your machine? Thanks.
Use https://github.com/rustdesk/rustdesk-server-pro/issues/99#issuecomment-1775326168 instead.
@Apashh Can you please try again this test on your machine? Thanks.
Test and error with same command :
thread 'main' panicked at 'Could not send email: lettre::transport::smtp::Error { kind: Network, source: Custom { kind: InvalidData, error: AlertReceived(ProtocolVersion) } }', src/main.rs:93:19
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Command : ./simple_test_linux -f address@domain.com -p Password -S -P 587-s ssl0.ovh.net -t address_to@domain.com -u address@domain.com
Could not send email: lettre::transport::smtp::Error { kind: Network, source: Custom { kind: InvalidData, error: AlertReceived(ProtocolVersion) } }
This error can be handled by the server, the web console should show it.
The smtp server sometimes reports "ProtocolVersion".
Can you please try some more times to see if there're other outputs?
Could not send email: lettre::transport::smtp::Error { kind: Network, source: Custom { kind: InvalidData, error: AlertReceived(ProtocolVersion) } }
This error can be handled by the server, the web console should show it.
The smtp server sometimes reports "ProtocolVersion".
Can you please try some more times to see if there're other outputs?
After 4 tests, its OK :
I find a problem that the same email configuration may not trigger the send actions (if initialization fails).
After 4 tests, its OK :
Maybe it is the reason.
@rustdesk Shall we add retries when the mailer meets email: lettre::transport::smtp::Error { kind: Network, source: Custom { kind: InvalidData, error: AlertReceived(ProtocolVersion) } }
for some specifed smtp servers?
Why have this error? You can ask chatgpt to get more understanding before add retry, and choose the best retry strategy.
The server has a singleton mailer instance.
It is only reset on server init
and smtp update
.
If server init
failed, it will also skip update when smtp settings are the same.
The server has a singleton mailer instance.
It is only reset on server
init
and smtpupdate
.If server
init
failed, it will also skip update when smtp settings are the same.
How does this relate to retry?
Why init fail?
@Apashh https://github.com/rustdesk/rustdesk-server-pro/releases/tag/1.1.10-4 could you try it out?
@Apashh https://github.com/rustdesk/rustdesk-server-pro/releases/tag/1.1.10-4 could you try it out?
Test and all is good ! Thanks !
We receive same error like mentioned in: https://github.com/rustdesk/rustdesk-server-pro/issues/26
And also we receive error like in the old thread that has been closed: https://github.com/rustdesk/rustdesk-server-pro/issues/75
Support couldn't help us either..... we use 587 with a lot of systems and especially Linux Servers.
Please try out https://github.com/rustdesk/rustdesk-server-pro/issues/99#issuecomment-1755332344 and https://github.com/rustdesk/rustdesk-server-pro/issues/26#issuecomment-1668711541, paste the output, We will follow up
Mails are sent correctly with the simple mail test script! But the error on the web console remains.... here is the output:
Regarding https://github.com/rustdesk/rustdesk-server-pro/issues/26#issuecomment-1668711541 ... when i command: openssl s_client -connect smtp.office365.com:587 -starttls smtp
the output is the following:
web console
is it >=1.1.10-4?
We on 1.1.10-5 currently, but was also the same problem in 1.1.9
same server? docker?
We run on Ubuntu 22.04.3 LTS and i do not know what you mean by "same server". We have one server for Rustdesk, installed via your install script. Mail Server of course on a different system.
If possible, please send your mail host to support@rustdesk.com
If possible, please send your mail host to support@rustdesk.com
We do not have 587 opened to public. Just specific hosts in the cloud, like the rustdesk server for example
can you show us web console smtp settings page snapshot?
ERROR with STARTTLS Active:
ERROR with STARTTLS not active:
Hello,
I'm on 1.1.10-3 and my email not send.... How change smtp settings or email without access on web console ? Maybe in sqlite ?
Thanks !