Closed attie-argentum closed 9 months ago
Hi @attie-argentum
Please try running setup in verbose mode:
imap-backup setup --verbose
Then, go to your account and do 2 things:
server
, (I think in your case this should be outlook.office365.com
),5. test connection
again, and see if the debug output helps.This article indicates a series of possible problems and solutions for outlook.office365.com
Edit: added link
Please try running setup in verbose mode
Good idea - I didn't think for a --verbose
flag...
I now get the following, so I think this probably isn't an issue with imap-backup
?
Choose an action:
[...]
? 5
D, [2022-10-10T11:01:08.079075 #9] DEBUG -- : Creating IMAP instance: outlook.office365.com, options: {:port=>993, :ssl=>{:ssl_version=>:TLSv1_2}}
D, [2022-10-10T11:01:08.079409 #9] DEBUG -- : Logging in: xxx@xxx.xxx/xxxxxxxxxxxxxxxx
S: * OK The Microsoft Exchange IMAP4 service is ready. [xxx]
C: RUBY0001 LOGIN xxx@xxx.xxx [PASSWORD REDACTED]
[~1s delay here]
S: RUBY0001 NO LOGIN failed.
No response
This articles indicates a series of possible problems and solutions for outlook.office365.com
Did you mean to include a link? I've had a read around, and I suspect this may be out of my control...
You're right, I didn't include the link. I've edited the comment. The link is https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-for-outlook-com-d088b986-291d-42b8-9564-9c414e2aa040
I think I'll close this, as I'm pretty confident it's actually an issue with Microsoft... thanks for the input!
Authentication with IMAP is not anymore possible with basic password auth.
Information:
Are you planning to integrate oauth2 into imap-backup?
Otherwise backuping office 365 / exchange online will not be possible anymore.
Hi @vielhuber
It's a shame Office 365 is removing basic authentication. Implementing OAuth2 involves a lot of work. imap-backup
previously had OAuth2 fro GMail, but I removed it as they are still supporting basic auth.
A PR would be welcome, but it would need to be well tested and documented.
You're right, perhaps a tool like https://emailengine.app/ could be an answer to this problem. Just also found the open source repo https://github.com/simonrob/email-oauth2-proxy.
On the other hand if you have successfully generated an access token (instead of a password), the implementation should be easy.
The steps I would see are:
client_id
, client_secret
, tenant_id
. This should be not hardhttps://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/token
)I don't have the ability and experience to provide a PR for this. Any chance to support you in another way?
The question is if it is worth it - or outside of imap-backup's scope.
I've come to the conclusion that https://github.com/simonrob/email-oauth2-proxy is a very attractive solution to this problem. I will test this out in future days, how it works together with imap-backup and post an update here.
I've successfully started the proxy and am trying now to connect via imap-backup:
config.json
{
"username": "xxx@xxx.xxx",
"password": "xxx",
"local_path": "xxx",
"server": "localhost",
"connection_options": {
"port": 1993,
"ssl": {
"verify_mode": 0
}
}
},
However, I get:
Unexpected error: SSL_connect returned=1 errno=0 peeraddr=127.0.0.1:1993 state=error: wrong version number
I think this is totally unencrypted, is this possible with imap-backup at all to connect to a local proxy?
Got it running when setting up an encrypted proxy. Seems that imap-backup does not support unencrypted connections.
Hi @vielhuber
imap-backup defaults to activating ssl when connecting.
Please try setting this to false
in the account's connection_options:
connections options (as JSON): {"ssl": false}
I'm closing as the README now recommends email-oauth2-proxy
I've been using this to backup emails from
outlook.office365.com
for some time (thanks, great project!)Unfortunately, a while ago, it started failing - looking in to it now, I run the
setup
subcommand, select the account, and use the "test connection" action... after a second or so it responds as follows:Attempting to run a backup produces the following output:
I have updated to v8.0.1, and I've tried changing / confirming my password with no joy.
Any ideas? Happy to provide more info if it would be helpful!