[neomutt-users] troubleshooting O365 IMAP

Andrew Sullivan ajs at crankycanuck.ca
Tue Dec 13 16:37:42 CET 2022


Hi,

I use neomutt with two mail systems.  One of them is a dovecot server that seems to work just fine.  The other, however, is an O365 server, to which I connect over IMAP.  This uses XOAUTH2 because MSFT doesn't support anything else any more, but the difficulty I have used to happen with passwords too.  I'm sort of at a loss about how to troubleshoot this more.

My client is on MacOS installed via homebrew.  I keep it up to date using brew.  At the moment this means version 20220429.

The difficulty involved IMAP timing out when connected to O365.  The connection appears to drop, and then it gets into a state that it doesn't seem to recover from.  It is particularly bad when there are messages flagged deleted, because expunge fails when I try to change servers and the client doesn't seem to be able to cope with this.  I usually end up having to force the client to exit, and in many cases the client reports a segfault when that happens.

I've tried logging this at -d 4 (higher levels are simply too noisy for me, at least, to learn anything), and I _think_ these are relevant lines to the behaviour:

[2022-12-13 09:18:35]<3> imap_mbox_close() closing imaps://sullivan@isoc.org@outlook.office365.com/INBOX, restoring (none)
[2022-12-13 09:18:35]<1> send() failed to send notification: NT_CONTEXT/2, global 0x6000021483c0, event 0x60000054b1c0
[2022-12-13 09:18:35]<1> mutt_body_free() not unlinking PastedGraphic-2.png
[2022-12-13 09:18:36]<1> mutt_body_free() not unlinking Caller 06-21-21.HTML
[2022-12-13 09:18:36]<1> mutt_body_free() not unlinking image001.png
[2022-12-13 09:18:36]<1> mutt_body_free() not unlinking signature.asc
[2022-12-13 09:18:36]<1> mutt_body_free() not unlinking image001.png
[2022-12-13 09:18:36]<1> mutt_body_free() not unlinking invite.ics
[2022-12-13 09:18:36]<E> cmd_handle_fatal() Mailbox sullivan at isoc.org@outlook.office365.com closed
[…]
[2022-12-13 09:21:59]<1> send() failed to send notification: NT_MAILBOX/2, global 0x6000021483c0, event 0x60000054b1c0
[2022-12-13 09:21:59]<1> index_function_dispatcher() Handled OP_EXIT (102) -> done
[2022-12-13 09:21:59]<3> mailbox_free() not freeing visible mailbox imaps://sullivan@isoc.org@outlook.office365.com/INBOX with refcount -1
[2022-12-13 09:21:59]<M> imap_logout_all() Closing connection to outlook.office365.com...
[2022-12-13 09:21:59]<2> mutt_socket_write_d() 4> DONE
b0006 LOGOUT
[2022-12-13 09:21:59]<2> cmd_handle_untagged() Handling BYE
[2022-12-13 09:21:59]<3> imap_cmd_step() IMAP queue drained
[2022-12-13 09:21:59]<M> imap_logout_all() Closing connection to outlook.office365.com...
[…]
[2022-12-13 09:21:59]<3> mailbox_free() freeing invisible mailbox imaps://ajs@crankycanuck.ca@mx5.yitter.info/INBOX with refcount 0
[2022-12-13 09:21:59]<3> mailbox_free() not freeing invisible mailbox imaps://sullivan@isoc.org@outlook.office365.com/INBOX with refcount -1
[2022-12-13 09:21:59] Closing log.


I have imap_idle set and currently have set imap_keepalive = 119 (but I've played with this setting a lot without luck).

Any suggestions on what else I can do to figure out what's up?

Thanks,

A

-- 
Andrew Sullivan
ajs at crankycanuck.ca


More information about the neomutt-users mailing list