Hi,

I'm trying to develop an application that moves messages from one folder 
to another.
It tries to achieve this with these commands:

. UID COPY 2496 "INBOX.Somefolder"
. OK [COPYUID 1229336836 2496 16] COPY completed.
. UID STORE 2496 +Flags (\Deleted)
* 22 FETCH (UID 2496 FLAGS (\Answered \Seen \Deleted))
. OK STORE completed.
. HKC49d249368532f CLOSE
. OK mailbox closed.

The problem I have is this: closing/expunging the folder sometimes
makes those messages that were just marked as deleted
to appear in Trash (as recent), other time it does not.
I investigated how Thunderbird does it (catching tcp packages)
and it seemed to be the same (but for Thunderbird messages never
appear in Trash after closing the mailbox).
I tried several times today earlier and then each time the originals 
(marked deleted)
landed for close in Trash.
I asked our sysadmins and they said IMAP_MOVE_EXPUNGE_TO_TRASH is set to 1.
But then why it's not happening for Thunderbird?
Later on I tried once more, and it was not happening any more...
I copy below two IMAP sessions where in the first closing the mailbox is 
resulting
in deleted message showing up in Trash, in the other not any more (and 
then I was again
unable to reproduce it). Between there were some other actions that I 
was trying.
Maybe those caused the messages not going any more to Trash?
Maybe I made something really silly, but if IMAP_MOVE_EXPUNGE_TO_TRASH 
is enabled
then why I'm able to make such test cases where they are not going to Trash?
Did I switch on something that disables this for a session or a given 
amount of time??
I don't know much about IMAP, so I'd appreciate any clarification.
As far as I remember I had switched on Thunderbird just where there are 
such comments
in the log below.

Thank you so much,

Gergely Fabian
P.S. Just remembered: I was trying also on Friday with pure telnet then 
deleted flagged messages were not getting to Trash.
On Monday they were getting to Trash... Today first they were then again 
not... No idea what's going on.

. select INBOX.Trash
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 2 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1218641971] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
. OK [READ-WRITE] Ok
. select INBOX
* FLAGS ($Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ($Forwarded \* \Draft \Answered \Flagged \Deleted 
\Seen)] Limited
* 27 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1218641971] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
. OK [READ-WRITE] Ok
. uid search deleted
* SEARCH 2575
. OK SEARCH done.
. close
. OK mailbox closed.
------- Here it comes where after closing INBOX messages get to Trash
. select INBOX.Trash
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 3 EXISTS
* 1 RECENT
* OK [UIDVALIDITY 1218641971] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
. OK [READ-WRITE] Ok
. uid search deleted
* SEARCH
. OK SEARCH done.
. uid search undeleted
* SEARCH 3264 3265 3266
. OK SEARCH done.
. select INBOX
* FLAGS ($Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ($Forwarded \* \Draft \Answered \Flagged \Deleted 
\Seen)] Limited
* 26 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1218641971] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
. OK [READ-WRITE] Ok
---------- I think I was playing here with Thunderbird, that's why there 
is again a deleted message, but I don't remember exactly
. uid search deleted
* SEARCH 2514
. OK SEARCH done.
. close
. OK mailbox closed.
----------- again I think I was testing with Thunderbird, and maybe even 
deleted there the message that got last time to Trash
. select INBOX.Trash
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1218641971] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
. OK [READ-WRITE] Ok
. idle
+ entering idle mode
. close
. NO Error in IMAP command received by server.
. logout
* BYE LOGOUT received
. OK Completed
Connection closed by foreign host.
--------- here I thought, ok, let's try what commands Thunderbird 
gave... maybe that's making difference
$ telnet mail.****** 143
Trying ********...
Connected to *******
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE 
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE XMAGICTRASH] 
Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See 
COPYING for distribution information.
. login **** *****
. OK User logged in
. namespace
* NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." "."))
. OK NAMESPACE completed.
. lsub "" "INBOX.*"
* LSUB (\HasNoChildren) "." "INBOX.Somefolder"
------------ Some folders listed
. OK LSUB completed
. list "" "INBOX"
* LIST (\Marked \HasChildren) "." "INBOX"
. OK LIST completed
. select "INBOX"
* FLAGS ($Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ($Forwarded \* \Draft \Answered \Flagged \Deleted 
\Seen)] Limited
* 26 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1218641971] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
. OK [READ-WRITE] Ok
. getquotaroot "INBOX"
* QUOTAROOT "INBOX" "ROOT"
* QUOTA "ROOT"
. OK GETQUOTAROOT Ok.
. uid search undeleted
* SEARCH 41 131 162 300 315 574 913 1531 1773 1789 2178 2214 2232 2289 
2291 2299 2322 2333 2383 2418 2426 2496 2505 2507 2515 2576
. OK SEARCH done.
. uid copy 2576 "INBOX.Somefolder"
. OK [COPYUID 1229336836 2576 12] COPY completed.
. uid store 2576 +FLAGS (\Deleted \Seen)
* 26 FETCH (UID 2576 FLAGS (\Seen \Deleted))
. OK STORE completed.
. close
. OK mailbox closed.
. logout
* BYE LOGOUT received
. OK Completed
Connection closed by foreign host.
$ telnet mail.****** 143
Trying *********...
Connected to *************.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE 
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE XMAGICTRASH] 
Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See 
COPYING for distribution information.
. login ********* *********
. OK User logged in
. select INBOX
* FLAGS ($Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ($Forwarded \* \Draft \Answered \Flagged \Deleted 
\Seen)] Limited
* 25 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1218641971] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
. OK [READ-WRITE] Ok
------- And here they are not any more in Trash
. select "INBOX.Trash"
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1218641971] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
. OK [READ-WRITE] Ok


------------------------------------------------------------------------------
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to