davmail icon indicating copy to clipboard operation
davmail copied to clipboard

davmail 5.5.1 keeps moving messages from Inbox to Trash

Open alanorth opened this issue 3 years ago • 5 comments

I'm using davmail 5.5.1 on Arch Linux and I am not sure how to explain it, but sometimes I find messages from the Inbox in my Trash. I drag them back to the Inbox in Thunderbird, but when I check the Trash a few minutes later they are back in the Trash.

My configuration is using Outlook 365 in O365Modern mode with IMAP/SMTP on Thunderbird 78.10.1. Thanks!

alanorth avatar May 10 '21 13:05 alanorth

DavMail will not move messages on its own, except in POP mode.

You should probably check Thunderbird spam settings and DavMail log to understand what is going on.

mguessan avatar May 17 '21 12:05 mguessan

Thanks @mguessan. I just checked again after using Thunderbird for an hour or so, reading some emails, responding to some, and deleting a few others. I was surprised to find a handful of messages in my Trash again.

I am willing to try looking in the logs, but I'm anticipating there being thousands of lines, and I'm not even sure how to trigger this weird behavior. Which logging parameters should I set? I currently have:

  • log4j.logger.httpclient.wire=WARN
  • log4j.logger.org.apache.commons.httpclient=WARN
  • log4j.rootLogger=INFO
  • log4j.logger.davmail=INFO
  • log4j.logger.org.apache.http.wire=WARN
  • log4j.logger.org.apache.http=WARN

alanorth avatar May 17 '21 14:05 alanorth

You need:

log4j.logger.davmail=DEBUG

to get all IMAP commands passed on your IMAP connection

Then look for MOVE message commands.

mguessan avatar May 17 '21 14:05 mguessan

You're right, this does seem to be a Thunderbird issue. I just noticed this message in the status bar a few seconds after dragging one of the emails from the Trash to the Inbox:

Moved 1 message from Inbox to Trash

So Thunderbird is doing something weird here. I've been using Thunderbird for years so I'm not sure what it could be. Perhaps it's a setting in this new profile I created when migrating to davmail a few weeks ago. These messages are not spam and there are no filter rules for this account! Curious and infuriating.

Closing this issue as it's unrelated to davmail.

alanorth avatar May 17 '21 15:05 alanorth

@mguessan I am still getting this bug. It only happens on my davmail IMAP account. Never on my normal IMAP account with a non-Microsoft mail provider.

In the screenshot below you see Thunderbird moves two images from Inbox to Trash (without me asking!). Then I go to the trash and move them back to the Inbox. Then it moves them back after a few seconds. And on and on...

swappy-20211103_154042-fs8

I see something like this in the log with log4j.logger.davmail=DEBUG:

2021-11-03 15:51:34,096 DEBUG [ImapConnection-58528] davmail  - < 105 uid move 50733:50734 "Trash"
2021-11-03 15:51:34,660 DEBUG [ImapConnection-58528] davmail  - > 105 OK move completed
2021-11-03 15:52:02,637 DEBUG [ImapConnection-58532] davmail  - < 58 uid move 12871:12872 "INBOX"
2021-11-03 15:52:03,235 DEBUG [ImapConnection-58532] davmail  - > 58 OK move completed
2021-11-03 15:52:13,598 DEBUG [ImapConnection-58528] davmail  - < 110 uid move 50735:50736 "Trash"
2021-11-03 15:52:14,151 DEBUG [ImapConnection-58528] davmail  - > 110 OK move completed
2021-11-03 15:51:20,241 DEBUG [ImapConnection-58532] davmail  - < 51 uid move 12869:12870 "INBOX"
2021-11-03 15:51:20,820 DEBUG [ImapConnection-58532] davmail  - > 51 OK move completed
2021-11-03 15:44:45,224 DEBUG [ImapConnection-58528] davmail  - < 98 uid move 50731:50732 "Trash"
2021-11-03 15:44:45,820 DEBUG [ImapConnection-58528] davmail  - > 98 OK move completed

A few other observations:

  • It only seems to happen to messages I've replied to
  • If I move them back to the Inbox and then quit Thunderbird, it doesn't happen to those messages again after re-opening Thunderbird

Appreciate any more help troubleshooting. Thank you!

alanorth avatar Nov 03 '21 13:11 alanorth