Messages marked as DELETED by IMAP not being EXPUNGED

Raise/discuss any potential issues with MailEnable for consideration in project issue register.
Post Reply
harmgsn
Posts: 1
Joined: Mon Aug 31, 2020 5:06 am

Messages marked as DELETED by IMAP not being EXPUNGED

Post by harmgsn » Mon Aug 31, 2020 5:16 am

So I've modified the https://github.com/quentinsf/IMAPdedup "IMAPdedupe" script to include an EXPUNGE before logging out of the session, yet this doesn't seem to actually delete the items out of the inbox.

Backstory: These mailboxes were migrated from hMailServer successfully. There were issues with many many messages being duplicated (thousands of times) in hMailServer. Now that we've completed migration, I'm trying to go through and clear up duplicate messages. In using the script above in dry-run mode, I've confirmed that it's actually finding the correct duplicates. When I try to run the script in live mode, it DOES issue a "STORE" command with the "/Deleted" flag set. I've added the EXPUNGE command to the script in an effort to make sure MailEnable actually deletes and removes the messages in question. Based on the logs, it's showing the STORE is correct and I do see an Expunge command issued... yet the messages remain. I've waited 12 hours and re-run the script and it finds the same duplicates and marks them again... doesn't do anything seeing as they're actually already marked for deletion) yet MailEnable simply does not remove them. I can find the MAI file on the file system, but I'm hesitant to start manually deleting them as I'm not 100% sure how that would impact any indexes or database entries.

Post Reply