rustdesk / rustdesk-server-pro

Some scripts for RustDesk Server Pro are hosted here.
142 stars 73 forks source link

Failed to check STMP: deadline has elapsed (Microsoft 365 with 2FA) #37

Open ghost opened 1 year ago

ghost commented 1 year ago

Trying to configure SMTP for my server and I get a "Failed to check STMP: deadline has elapsed" error message after a few seconds of clicking the "Check" button.

dinger1986 commented 1 year ago

sorry I had meant add comments to this existing issue with is opened https://github.com/rustdesk/rustdesk-server-pro/issues/26

rustdesk commented 1 year ago

Trying to configure SMTP for my server and I get a "Failed to check STMP: deadline has elapsed" error message after a few seconds of clicking the "Check" button.

Did you receive 2FA message?if so, i will add longer timeout.

ghost commented 1 year ago

No 2FA message appeared.

dinger1986 commented 1 year ago

I'm going to try the prerelease at some point today and will see if it works, I think it will need an app password

dinger1986 commented 1 year ago

Enable SMTP Auth use APP password if using MFA https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission#enable-smtp-auth-for-specific-mailboxes

ghost commented 1 year ago

SMTP basic auth is depreciated / about to be depreciated depending on M365 Tenant. OAuth 2.0 token-based authorisation is the updated method.

ie Not all M365 tenants support SMTP Auth.

https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online

dinger1986 commented 1 year ago

being able to connect to it using direct send https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#settings-for-direct-send would fix alot of peoples issues anyways as it should be on a static and the majority of people who set it up will be office 365 admins

williamharwell commented 1 year ago

Direct send requires you to use port 25, which a lot of hosting providers block.

dinger1986 commented 1 year ago

Most hosting providers will remove the block if requested

omarfarooq4u2c commented 1 year ago

HELLO can some one help me to fix this problem:

2023-10-02 11:28:44 SMTP ERROR: Failed to connect to server: (0) SMTP Error: Could not connect to SMTP host. Failed to connect to server Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server