Re: Trying to sync an ms exchange mail service

2023-11-26 Thread Tomas Nordin
Tomas Nordin  writes:

> Oswald Buddenhagen  writes:
>
>> On Sat, Nov 25, 2023 at 01:02:43PM +, Tomas Nordin wrote:
>>>Does it confirm any suspicions maybe?
>>>
>> yes. you need to try GSSAPI, and if that still doesn't work, PLAIN.
>
> I am getting somewhere with PLAIN (AuthMechs PLAIN under
> IMAPAccount). But I am getting warnings as this
>
> C: 0/1  B: 0/2  F: +0/0 *0/0 #0/0  N: +0/0 *0/0 #0/0
> Warning: lost track of 4457 pulled message(s)
> Warning: lost track of 213 pushed message(s)
> C: 0/1  B: 0/2  F: +4/213 *0/0 #0/0  N: +0/4457 *0/0 #0/0
> IMAP error: unexpected tag .wrap
> C: 1/1  B: 1/2  F: +4/213 *0/0 #0/0  N: +0/4457 *0/0 #0/0
>
> and I sort of forgot that I first tried this with offlineimap. Would it
> be safe to erase the content of the relevant maildir folders and start
> anew with mbsync. (Thinking there is some confusions between the ways
> the two syncers name the files...). With safe I mean I dont want
> everything to get deleted on the server side.

I was restless to get this done, it seems now obvious that yes, one can
restart everything. I removed the

cur
new
tmp
.mbsyncstate.journal
.mbsyncstate.new
.uidvalidity

directories and files from the folders. I tried to make sure not to
change anything on the server side with the following configuration
options under Channel

Create Near
Expunge None
Sync Pull

I got a number of errors like this

IMAP command 'UID FETCH 323 (INTERNALDATE BODY.PEEK[])' returned an error: UID 
FETCH 323 (INTERNALDATE BODY.PEEK[])

but it was just to rerun mbsync until silent and all mail was
retrieved. I have now configured it back so I can delete mail on the far
side. All is good.

Thanks for all work on this program.

Have a nice evening
--
Tomas


___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Re: Trying to sync an ms exchange mail service

2023-11-26 Thread Tomas Nordin
Oswald Buddenhagen  writes:

> On Sat, Nov 25, 2023 at 01:02:43PM +, Tomas Nordin wrote:
>>Does it confirm any suspicions maybe?
>>
> yes. you need to try GSSAPI, and if that still doesn't work, PLAIN.

I am getting somewhere with PLAIN (AuthMechs PLAIN under
IMAPAccount). But I am getting warnings as this

C: 0/1  B: 0/2  F: +0/0 *0/0 #0/0  N: +0/0 *0/0 #0/0
Warning: lost track of 4457 pulled message(s)
Warning: lost track of 213 pushed message(s)
C: 0/1  B: 0/2  F: +4/213 *0/0 #0/0  N: +0/4457 *0/0 #0/0
IMAP error: unexpected tag .wrap
C: 1/1  B: 1/2  F: +4/213 *0/0 #0/0  N: +0/4457 *0/0 #0/0

and I sort of forgot that I first tried this with offlineimap. Would it
be safe to erase the content of the relevant maildir folders and start
anew with mbsync. (Thinking there is some confusions between the ways
the two syncers name the files...). With safe I mean I dont want
everything to get deleted on the server side.

I have seen a couple of different variants of those "unexpected tag"
errors.

--
Tomas


___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Re: Trying to sync an ms exchange mail service

2023-11-25 Thread Oswald Buddenhagen

On Sat, Nov 25, 2023 at 01:02:43PM +, Tomas Nordin wrote:

Does it confirm any suspicions maybe?


yes. you need to try GSSAPI, and if that still doesn't work, PLAIN.

and change your password immediately, as you just managed to disclose it 
publicly ...




___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Re: Trying to sync an ms exchange mail service

2023-11-25 Thread Tomas Nordin
Oswald Buddenhagen  writes:

> On Sun, Nov 19, 2023 at 03:38:36PM +, tom...@posteo.net wrote:
>>IMAP command 'AUTHENTICATE NTLM 
>>TlRMTVNTUAABBwIgACA=' returned an error: NO 
>>AUTHENTICATE failed.
>>
> can you get a log from offlineimap to see what it is doing? my guess 
> would be that it's not using NTLM, either because it doesn't use SASL at 
> all or because the mechanism is excluded.

I attach a log produced with the offlineimap flags -d imap and -l
. It managed to produce 13 MB of output and the attached version
is cut, saving the top and bottom output of the original log.

Does it confirm any suspicions maybe?

--
Tomas

2023-11-25 13:27:00 INFO: OfflineImap 8.0.0 starting...
  Python: 3.11.2 Platform: linux
  Args: /usr/bin/offlineimap -l offlineout.log -d imap
2023-11-25 13:27:00 INFO: imaplib2 v3.05, Python v3.11.2, OpenSSL 3.0.11 19 Sep 
2023
2023-11-25 13:27:00 INFO: Debug mode: Forcing to singlethreaded.
2023-11-25 13:27:00 DEBUG: Now debugging for imap: IMAP protocol debugging
2023-11-25 13:27:00 DEBUG: Now debugging for : Other offlineimap related sync 
messages
2023-11-25 13:27:00 DEBUG: [imap]: Using authentication mechanisms ['GSSAPI', 
'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
2023-11-25 13:27:00 INFO: *** Processing account KTH
2023-11-25 13:27:00 INFO: Establishing connection to webmail.kth.se:993 
(remote_KTH)
2023-11-25 13:27:00 DEBUG: [imap]: remote_KTH: level 'tls_compat', version 
'None'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.31 Account sync KTH imaplib2 version 
3.05
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.31 Account sync KTH imaplib2 debug 
level 5, buffer level 3
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.44 Account sync KTH connected to 
webmail.kth.se on port 993
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.44 webmail.kth.se writer starting
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.44 webmail.kth.se reader starting 
using poll
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.44 Account sync KTH 
_request_push(continuation, welcome, {}) = b'OMJM0'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.44 Account sync KTH 
welcome:b'OMJM0'.ready.wait
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.50 webmail.kth.se reader poll => 
[(5, 1)]
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.50 webmail.kth.se reader rcvd 53
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.50 webmail.kth.se reader < b'* OK 
The Microsoft Exchange IMAP4 service is ready.\r\n'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.54 webmail.kth.se handler starting
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.54 webmail.kth.se handler 
_put_response(b'* OK The Microsoft Exchange IMAP4 service is ready.')
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.54 webmail.kth.se handler 
untagged_responses[OK] 0 += ["b'The Microsoft Exchange IMAP4 service is 
ready.'"]
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.54 webmail.kth.se handler 
_request_pop(continuation, (False, b'* OK The Microsoft Exchange IMAP4 service 
is ready.')) [0] = b'OMJM0'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.54 webmail.kth.se handler 
welcome:b'OMJM0'.ready.set
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 Account sync KTH 
_get_untagged_response(OK) => [b'The Microsoft Exchange IMAP4 service is 
ready.']
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 webmail.kth.se handler 
state_change_free.set
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 Account sync KTH state => NONAUTH
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 Account sync KTH [async] 
CAPABILITY ()
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 Account sync KTH 
state_change_pending.acquire
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 Account sync KTH 
state_change_pending.release
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 Account sync KTH 
_request_push(b'OMJM1', CAPABILITY, {}) = b'OMJM1'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 Account sync KTH data=b'OMJM1 
CAPABILITY'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 Account sync KTH 
CAPABILITY:b'OMJM1'.ready.wait
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.55 webmail.kth.se writer > b'OMJM1 
CAPABILITY\r\n'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.59 webmail.kth.se reader poll => 
[(5, 1)]
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.59 webmail.kth.se reader rcvd 161
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.59 webmail.kth.se reader < b'* 
CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=NTLM AUTH=GSSAPI SASL-IR UIDPLUS 
MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+\r\n'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.59 webmail.kth.se reader < b'OMJM1 
OK CAPABILITY completed.\r\n'
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.59 webmail.kth.se handler 
_put_response(b'* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=NTLM AUTH=GSSAPI 
SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+')
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.59 webmail.kth.se handler 
untagged_responses[CAPABILITY] 0 += ["b'IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=NTLM 
AUTH=GSSAPI SASL-IR UIDPLUS MOVE ID UNSEL"]
2023-11-25 13:27:00 DEBUG: [imap]:   27:00.59 

Re: Trying to sync an ms exchange mail service

2023-11-25 Thread Tomas Nordin
Tomas Nordin  writes:

> Oswald Buddenhagen  writes:
>
>> On Sat, Nov 25, 2023 at 01:02:43PM +, Tomas Nordin wrote:
>>>Does it confirm any suspicions maybe?
>>>
>> yes. you need to try GSSAPI, and if that still doesn't work, PLAIN.
>
> Thanks, I go about trying that...
>
>>
>> and change your password immediately, as you just managed to disclose
> it
>> publicly ...

Got it, not that difficult to figure out. Embarrassing. Could have been
nice of offlineimap manual to give some hint about this...



___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Re: Trying to sync an ms exchange mail service

2023-11-25 Thread Tomas Nordin
Oswald Buddenhagen  writes:

> On Sat, Nov 25, 2023 at 01:02:43PM +, Tomas Nordin wrote:
>>Does it confirm any suspicions maybe?
>>
> yes. you need to try GSSAPI, and if that still doesn't work, PLAIN.

Thanks, I go about trying that...

>
> and change your password immediately, as you just managed to disclose
it
> publicly ...

Done. And thanks for warning me about that. I would be curious to
understand how, maybe you can explain to me in an offlist mail?


___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Re: Trying to sync an ms exchange mail service

2023-11-22 Thread Tomas Nordin
Hello Oswald

Oswald Buddenhagen  writes:

> On Sun, Nov 19, 2023 at 03:38:36PM +, tom...@posteo.net wrote:
>>IMAP command 'AUTHENTICATE NTLM 
>>TlRMTVNTUAABBwIgACA=' returned an error: NO 
>>AUTHENTICATE failed.
>>
> can you get a log from offlineimap to see what it is doing? my guess 
> would be that it's not using NTLM, either because it doesn't use SASL at 
> all or because the mechanism is excluded.

I will try that tomorrow, it has some debugging options.

> see what the server offers (-Dn) and play around with AuthMechs.

$ mbsync -Dn KTH
Reading configuration file /home/tomas/.mbsyncrc
Channel KTH
Opening far side store KTH-remote...
Resolving webmail.kth.se... ok
Connecting to webmail.kth.se ([2001:6b0:1:11c2::82ed:1c35]:993)... 
Opening near side store KTH-local...
Connection is now encrypted
* OK The Microsoft Exchange IMAP4 service is ready.
>>> 1 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=NTLM AUTH=GSSAPI SASL-IR UIDPLUS 
MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
1 OK CAPABILITY completed.
Logging in...
Authenticating with SASL mechanism NTLM...
>>> 2 AUTHENTICATE NTLM TlRMTVNTUAABBwIgACA=
2 NO AUTHENTICATE failed.
IMAP command 'AUTHENTICATE NTLM TlRMTVNTUAABBwIgACA=' 
returned an error: NO AUTHENTICATE failed.

Does it say something? Play around with AuthMechs -- I dont know what
it means.

Thanks
--
Tomas


___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Re: Trying to sync an ms exchange mail service

2023-11-20 Thread Oswald Buddenhagen

On Sun, Nov 19, 2023 at 03:38:36PM +, tom...@posteo.net wrote:
IMAP command 'AUTHENTICATE NTLM 
TlRMTVNTUAABBwIgACA=' returned an error: NO 
AUTHENTICATE failed.


can you get a log from offlineimap to see what it is doing? my guess 
would be that it's not using NTLM, either because it doesn't use SASL at 
all or because the mechanism is excluded.


see what the server offers (-Dn) and play around with AuthMechs.

regards


___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Trying to sync an ms exchange mail service

2023-11-19 Thread tomasn

Hello Isync list

I have a fresh install computer (Debian on it) and wanted to try
mbsync to get my mail. Getting mail from this account (posteo) works
fine. I have a soon-to-be dead mail service from my study time that I
still want to pull mail from.

This has been working fine using offlineimap (on my previous
machine). Turns out it still works (on this new machine), with the new
offlineimap using python3.

Anyway, so what I am trying to do now is sort of translate my config
from using offlineimap to a config for mbsync. Attached are the config I
used with offlineimap and it worked. Attached also the config I used
with mbsync and it did not work. Here is the terminal warning:

$ mbsync KTH
C: 0/1  B: 0/0  F: +0/0 *0/0 #0/0  N: +0/0 *0/0 #0/0
IMAP command 'AUTHENTICATE NTLM 
TlRMTVNTUAABBwIgACA=' returned an error: NO 
AUTHENTICATE failed.

C: 1/1  B: 0/0  F: +0/0 *0/0 #0/0  N: +0/0 *0/0 #0/0

Any hints or suggestion on what I am doing wrong. I installed mbsync
with apt, here is the version output: isync 1.4.4

Have a great evening
--
Tomas

offlineimap.rc-example
Description: Binary data


mbsyncrc-example
Description: Binary data
___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel