A few days ago I updated to Mercury 4.73 (from 4.72) and unfortunately I can confirm that there seems to be something wrong in Mecury's handling of /deleted flags in V4.73.
We use the built in mail client of our CRM-System (CAS GenesisWorld V12) and with Mercury 4.72 IMAP worked without any problems. The CRM-System has some mail filters configured that poll the inboxes of users that are not logged in to the system every 15 minutes or so. For example one of the filters handles spam-tagged mails in the users inboxes, it copies them to a spam folder, marks the original mail in the inbox as /seen and /deleted and does an expunge.
Now with mercury 4.73 the users still find the spam mails in their inboxes after logging in to the CRM-Client. Copying to the spam folder was done, but the original spams in the inboxes lost their /deleted-Flag. The /read-Flag is still set.
I did some session logging and foud out that the CRM-Server and the CRM-clients handle the imap-sessions correctly. They always do a proper logoff. But it's striking to note that the expunge-commands to the inbox fail, mercury says "NO Folder in use by other connections.".
[quote user="loring"]
Strange behavior noticed this morning: I was using Thunderbird to clean out my spam mailbox, which had accumulated a few hundred messages while I was away on vacation. I deleted about 200 emails, and selected "empty trash" from within Thunderbird. I stopped to answer the phone, only 2-3 minutes, and during the phone call Thunderbird apparently polled the server for new messages. When I came back to the computer, every message I had deleted was back in the Inbox, only now marked as "seen." I don't have time to set up and check logs right now; I'll try to take a look at that this weekend. But has anyone else seen this? [/quote]
We don't use Thunderbird, but I had a similar behavior yesterday. I deleted some messages and a few minutes later they were back in the inbox. I repeated the procedure - same effect. Finally I closed the CRM-Client and used Pegasus to delete the messages...
Edit:
Did some more searching on this forum and found related thread http://community.pmail.com/forums/post/29331.aspx, where Thunderbird seems to cause some problems when mail caching is enabled. But our CRM-clients have mail caching disabled.
I can reproduce the problem with the lost /deleted flag. I turned on session logging on mercury, sent a mail that would trigger a filtering rule of the CRM-Server to a user (user was not logged on to the CRM-client), waited for the CRM-Server to check the inboxes and turned off session logging. Searching the logs for the part with the specific user took a little time (I'm not very familiar with the IMAP protocol). This is the relevant part (IP, Domain, User and Password disguised):
09:31:30.578: Connection from XXX.XXX.XXX.XXX, Wed Sep 14 09:31:30 2011<lf>
09:31:30.609: << * OK DOMAIN IMAP4rev1 Mercury/32 v4.73 server ready.<cr><lf>
09:31:30.609: >> 100 LOGIN "USER" "PASSWORD"<cr><lf>
09:31:30.609: << 100 OK LOGIN completed.<cr><lf>
09:31:30.609: >> 101 SELECT "INBOX"<cr><lf>
09:31:30.609: << * 509 EXISTS<cr><lf>
09:31:30.609: << * 0 RECENT<cr><lf>
09:31:30.609: << * FLAGS (\Deleted \Draft \Seen \Answered)<cr><lf>
09:31:30.609: << * OK [UIDVALIDITY 1240929130] UID Validity<cr><lf>
09:31:30.609: << * OK [UIDNEXT 11406] Predicted next UID<cr><lf>
09:31:30.609: << * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] Settable message flags<cr><lf>
09:31:30.609: << 101 OK [READ-WRITE] SELECT completed.<cr><lf>
09:31:30.625: >> 102 NOOP<cr><lf>
09:31:30.625: << 102 OK NOOP complete.<cr><lf>
09:31:31.640: >> 103 UID COPY 11405:11405 "Junk or suspicious mail"<cr><lf>
09:31:31.640: << 103 OK COPY complete.<cr><lf>
09:31:31.640: >> 104 UID STORE 11405:11405 +FLAGS (\Deleted)<cr><lf>
09:31:31.640: << * 509 FETCH (UID 11405 FLAGS (\SEEN \DELETED))<cr><lf>
09:31:31.640: << 104 OK UID STORE complete.<cr><lf>
09:31:31.656: >> 105 EXPUNGE<cr><lf>
09:31:31.656: << 105 NO Folder in use by other connections.<cr><lf>
09:31:31.734: >> 106 LOGOUT<cr><lf>
09:31:31.796: << * BYE IMAP4rev1 server terminating connection.<cr><lf>
09:31:31.796: << 106 OK LOGOUT completed.<cr><lf>
09:31:31.812: --- Connection closed normally at Wed Sep 14 09:31:31 2011. ---
09:31:31.812:
Looking at inbox about half an hour later (in the meantime there was other work to do): deleted message (UID 11405 in the session log) still (or again) in inbox, /deleted flag lost, /seen flag still set, copy of the mail in folder "junk or suspicious mail".
Failed expunge (see log): I guess the CRM-Server establishes at least 2 sessions to one users mailbox at the same time. As far as I know there were no other processes connected to the users mailbox.
<p>A few days ago I updated to Mercury 4.73 (from 4.72) and unfortunately I can confirm that there seems to be something wrong in Mecury's handling of /deleted flags in V4.73.
We use the built in mail client of our CRM-System (CAS GenesisWorld V12) and with Mercury 4.72 IMAP worked without any problems. The CRM-System has some mail filters configured that poll the inboxes of users that are not logged in to the system every 15 minutes or so. For example one of the filters handles spam-tagged mails in the users inboxes, it copies them to a spam folder, marks the original mail in the inbox as /seen and /deleted and does an expunge.
Now with mercury 4.73 the users still find the spam mails in their inboxes after logging in to the CRM-Client. Copying to the spam folder was done, but the original spams in the inboxes lost their /deleted-Flag. The /read-Flag is still set.
I did some session logging and foud out that the CRM-Server and the CRM-clients handle the imap-sessions correctly. They always do a proper logoff. But it's striking to note that the expunge-commands to the inbox fail, mercury says "NO Folder in use by other connections.".
</p><p>[quote user="loring"]</p><p>Strange behavior noticed this morning:&nbsp; I was using Thunderbird to clean out&nbsp;my spam mailbox, which had accumulated a few hundred messages while I was away on vacation.&nbsp; I deleted about 200&nbsp;emails, and selected "empty trash" from within Thunderbird.&nbsp; I stopped to answer the phone, only 2-3 minutes,&nbsp;and during the phone call Thunderbird apparently polled the server for new messages. &nbsp; When I came back to the computer<i>, </i>every message I had deleted was back in the Inbox, only now marked as "seen."&nbsp;&nbsp;I don't have time to set up and check logs right now; I'll try to&nbsp;take a look at that this weekend.&nbsp; But has anyone else seen this?&nbsp; [/quote]</p><p>We don't use Thunderbird, but I had a similar behavior yesterday. I deleted some messages and a few minutes later they were back in the inbox. I repeated the procedure - same effect. Finally I closed the CRM-Client and used Pegasus to delete the messages...</p><p>&nbsp;</p><p>Edit:</p><p>Did some more searching on this forum and found related thread http://community.pmail.com/forums/post/29331.aspx, where Thunderbird seems to cause some problems when mail caching is enabled. But our CRM-clients have mail caching disabled. </p><p>I can reproduce the problem with the lost /deleted flag. I turned on session logging on mercury, sent a mail that would trigger a filtering rule of the CRM-Server to a user (user was not logged on to the CRM-client), waited for the CRM-Server to check the inboxes and turned off session logging. Searching the logs for the part with the specific user took a little time (I'm not very familiar with the IMAP protocol). This is the relevant part (IP, Domain, User and Password disguised):</p><p>09:31:30.578: Connection from XXX.XXX.XXX.XXX, Wed Sep 14 09:31:30 2011&lt;lf&gt;
09:31:30.609: &lt;&lt; * OK DOMAIN IMAP4rev1 Mercury/32 v4.73 server ready.&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &gt;&gt; 100 LOGIN "USER" "PASSWORD"&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &lt;&lt; 100 OK LOGIN completed.&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &gt;&gt; 101 SELECT "INBOX"&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &lt;&lt; * 509 EXISTS&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &lt;&lt; * 0 RECENT&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &lt;&lt; * FLAGS (\Deleted \Draft \Seen \Answered)&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &lt;&lt; * OK [UIDVALIDITY 1240929130] UID Validity&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &lt;&lt; * OK [UIDNEXT 11406] Predicted next UID&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &lt;&lt; * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] Settable message flags&lt;cr&gt;&lt;lf&gt;
09:31:30.609: &lt;&lt; 101 OK [READ-WRITE] SELECT completed.&lt;cr&gt;&lt;lf&gt;
09:31:30.625: &gt;&gt; 102 NOOP&lt;cr&gt;&lt;lf&gt;
09:31:30.625: &lt;&lt; 102 OK NOOP complete.&lt;cr&gt;&lt;lf&gt;
09:31:31.640: &gt;&gt; 103 UID COPY 11405:11405 "Junk or suspicious mail"&lt;cr&gt;&lt;lf&gt;
09:31:31.640: &lt;&lt; 103 OK COPY complete.&lt;cr&gt;&lt;lf&gt;
09:31:31.640: &gt;&gt; 104 UID STORE 11405:11405 +FLAGS (\Deleted)&lt;cr&gt;&lt;lf&gt;
09:31:31.640: &lt;&lt; * 509 FETCH (UID 11405 FLAGS (\SEEN \DELETED))&lt;cr&gt;&lt;lf&gt;
09:31:31.640: &lt;&lt; 104 OK UID STORE complete.&lt;cr&gt;&lt;lf&gt;
09:31:31.656: &gt;&gt; 105 EXPUNGE&lt;cr&gt;&lt;lf&gt;
09:31:31.656: &lt;&lt; 105 NO Folder in use by other connections.&lt;cr&gt;&lt;lf&gt;
09:31:31.734: &gt;&gt; 106 LOGOUT&lt;cr&gt;&lt;lf&gt;
09:31:31.796: &lt;&lt; * BYE IMAP4rev1 server terminating connection.&lt;cr&gt;&lt;lf&gt;
09:31:31.796: &lt;&lt; 106 OK LOGOUT completed.&lt;cr&gt;&lt;lf&gt;
09:31:31.812: --- Connection closed normally at Wed Sep 14 09:31:31 2011. ---
09:31:31.812:
</p><p>Looking at inbox about half an hour later (in the meantime there was other work to do): deleted message (UID 11405 in the session log) still (or again) in inbox, /deleted flag lost, /seen flag still set, copy of the mail in folder "junk or suspicious mail".</p><p>Failed expunge (see log): I guess the CRM-Server establishes at least 2 sessions to one users mailbox at the same time. As far as I know there were no other processes connected to the users mailbox.
</p>