question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Messages are not deleted after expunge

See original GitHub issue
      // Mark messages for deletion on remote server
      connection.seq.addFlags(uids, ['DELETED'], (err) => {
        if (err) {
          return console.log('Failed to mark messages for deletion:', err);
        }
        console.log('Messages are marked for deletion');
        connection.expunge((err: Error) => {
          if (err) {
            return console.log(
              `Failed to delete messages due to error: ${err.message}`
            );
          }
          console.log('Deleted messages');
        });
      });

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mscdexcommented, Aug 26, 2021

Again, it looks like you’re mixing UIDs and sequence numbers here. The connection.seq.* APIs deal only with sequence numbers. If uids actually contains UIDs, you need to be using connection.addFlags() instead.

0reactions
denissabramovscommented, Aug 29, 2021

I tried connection.addFlags(), nor Deleted, nor Trash is working. I’ll try Bin later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Message not deleting with m.expunge - Stack Overflow
For some reason though, the mail I have selected is not being deleted. My code is: m = imaplib.IMAP4_SSL("imap-mail.outlook.com") m.login( ...
Read more >
howto expunge messages marked deleted — oracle-tech
What I'm wondering about is how to set the server to expunge the messages in users mailboxes which were marked as 'deleted' but...
Read more >
IMAP not reflect "EXPUNGE" when I delete message - TechNet
My problem is: Exchange 2013 does not send EXPUNGE when I delete message. According to RFC "The IDLE command is sent from the...
Read more >
When is What ... Deleted, Expired, Expunged or Purged?
Messages in expunged folders, or messages that have been expunged individually, can not autonomously be restored by a user, and are gone ...
Read more >
cyrus not deleting expunged messages - Server Fault
I su'd to cyrus user and ran cyr_expire manually - reducing -D to 30 removed some dead mailboxes. so I figure that's probably...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found