Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As part of post-processing options, when fetching emails, osTicket can archive (move) or delete (remove) a mail message from the server. When using mail storage backend like IMAP - both operations requires `expunge` command to truly commit the changes to the mail server. That's all good and well, except Laminas Mail (our darling upstream lib) expunges the mailbox in real-time when a message is moved or deleted. This creates a problem for osTicket because **expunging causes message sequence numbers to reset at the server end during the session!!** Which in turn causes mismatch when we process the next message in the queued sequence. Additionally, expunging on every message operation cases unnecessary traffic to the mail server when every second counts. To resolve the issue - until we switch to using `UIDs` - this commit simply bypasses Laminas Mail IMAP's removeMessage function so we can skip expunging on message move/remove operations. osTicket expunges the mailbox at the end of fetch session.
- Loading branch information