[Dovecot] dovecot-1.2.9: OK No messages copied
Hi,
When I issue an IMAP copy command using the wrong UID, the server gives an "OK No messages copied" response.
This seems like the wrong response to me. If the UID doesn't exist, then it should respond with a "No" response - maybe something like "NO - copy error: bad UID"
I believe "OK No messages copied" would only be a suitable response if the email with the supplied UID had already been known to be copied successfully. I am using dovecot 1.2.9 - has this been fixed in newer versions of dovecot?
Regards
Attila
Attila Sipos
Netcall Telecom Ltd Registered in England 2831215. Registered Office : 3rd Floor, Hamilton House, 111 Marlowes, Hemel Hempstead, Herts, HP1 1BB
On Mon, 2012-03-26 at 14:28 +0100, Attila Sipos wrote:
When I issue an IMAP copy command using the wrong UID, the server gives an "OK No messages copied" response.
This seems like the wrong response to me. If the UID doesn't exist, then it should respond with a "No" response - maybe something like "NO - copy error: bad UID"
I believe "OK No messages copied" would only be a suitable response if the email with the supplied UID had already been known to be copied successfully. I am using dovecot 1.2.9 - has this been fixed in newer versions of dovecot?
Dovecot's behavior is correct. This (or things related to this) has been discussed in IMAP protocol mailing list. Basically it's not an error to use nonexistent UIDs. If you want details, ask in IMAP protocol ml and someone will probably explain.
I can understand that if using a set of UIDS or a UID range it would be complicated to return a fully-descriptive result and from what I can see, the IMAP RFC author was trying to avoid this complexity.
However, it someone specifies JUST ONE UID and that UID is non-existent, then a NO response could be a more useful response. I know the spec allows a response of OK but it is possible that this was not the intention for a single non-existent UID.
Regards
Attila
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi] Sent: 26 March 2012 15:46 To: Attila Sipos Cc: dovecot@dovecot.org Subject: Re: [Dovecot] dovecot-1.2.9: OK No messages copied
On Mon, 2012-03-26 at 14:28 +0100, Attila Sipos wrote:
When I issue an IMAP copy command using the wrong UID, the server gives an "OK No messages copied" response.
This seems like the wrong response to me. If the UID doesn't exist, then it should respond with a "No" response
- maybe something like "NO - copy error: bad UID"
I believe "OK No messages copied" would only be a suitable response if the email with the supplied UID had already been known to be copied successfully. I am using dovecot 1.2.9 - has this been fixed in newer versions of dovecot?
Dovecot's behavior is correct. This (or things related to this) has been discussed in IMAP protocol mailing list. Basically it's not an error to use nonexistent UIDs. If you want details, ask in IMAP protocol ml and someone will probably explain.
Netcall Telecom Ltd Registered in England 2831215. Registered Office : 3rd Floor, Hamilton House, 111 Marlowes, Hemel Hempstead, Herts, HP1 1BB
It might be more useful from your point of view, but it might not be from from someone else's point of view. If you want this changed, see if you can convince other people in imap-protocol list. All of the widely used IMAP servers behave the way Dovecot does.
On Mon, 2012-03-26 at 16:13 +0100, Attila Sipos wrote:
I can understand that if using a set of UIDS or a UID range it would be complicated to return a fully-descriptive result and from what I can see, the IMAP RFC author was trying to avoid this complexity.
However, it someone specifies JUST ONE UID and that UID is non-existent, then a NO response could be a more useful response. I know the spec allows a response of OK but it is possible that this was not the intention for a single non-existent UID.
Regards
Attila
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi] Sent: 26 March 2012 15:46 To: Attila Sipos Cc: dovecot@dovecot.org Subject: Re: [Dovecot] dovecot-1.2.9: OK No messages copied
On Mon, 2012-03-26 at 14:28 +0100, Attila Sipos wrote:
When I issue an IMAP copy command using the wrong UID, the server gives an "OK No messages copied" response.
This seems like the wrong response to me. If the UID doesn't exist, then it should respond with a "No" response
- maybe something like "NO - copy error: bad UID"
I believe "OK No messages copied" would only be a suitable response if the email with the supplied UID had already been known to be copied successfully. I am using dovecot 1.2.9 - has this been fixed in newer versions of dovecot?
Dovecot's behavior is correct. This (or things related to this) has been discussed in IMAP protocol mailing list. Basically it's not an error to use nonexistent UIDs. If you want details, ask in IMAP protocol ml and someone will probably explain.
Netcall Telecom Ltd Registered in England 2831215. Registered Office : 3rd Floor, Hamilton House, 111 Marlowes, Hemel Hempstead, Herts, HP1 1BB
OK, clearly I am not experienced enough in IMAP to argue. I am sure the imap-protocol people will tell me to get lost!
Thanks for your time. If you could possibly tell me how to know if an IMAP "UID COPY" is successful, I would appreciate it. Basically I'm moving a message from one folder to another. I thought I could issue a COPY command, check for success, then delete the email from the source folder.
Regards Attila
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi] Sent: 26 March 2012 16:23 To: Attila Sipos Cc: dovecot@dovecot.org Subject: Re: [Dovecot] dovecot-1.2.9: OK No messages copied
It might be more useful from your point of view, but it might not be from from someone else's point of view. If you want this changed, see if you can convince other people in imap-protocol list. All of the widely used IMAP servers behave the way Dovecot does.
On Mon, 2012-03-26 at 16:13 +0100, Attila Sipos wrote:
I can understand that if using a set of UIDS or a UID range it would be complicated to return a fully-descriptive result and from what I can see, the IMAP RFC author was trying to avoid this complexity.
However, it someone specifies JUST ONE UID and that UID is non-existent, then a NO response could be a more useful response. I know the spec allows a response of OK but it is possible that this was not the intention for a single non-existent UID.
Regards
Attila
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi] Sent: 26 March 2012 15:46 To: Attila Sipos Cc: dovecot@dovecot.org Subject: Re: [Dovecot] dovecot-1.2.9: OK No messages copied
On Mon, 2012-03-26 at 14:28 +0100, Attila Sipos wrote:
When I issue an IMAP copy command using the wrong UID, the server gives an "OK No messages copied" response.
This seems like the wrong response to me. If the UID doesn't exist, then it should respond with a "No" response
- maybe something like "NO - copy error: bad UID"
I believe "OK No messages copied" would only be a suitable response if the email with the supplied UID had already been known to be copied successfully. I am using dovecot 1.2.9 - has this been fixed in newer versions of dovecot?
Dovecot's behavior is correct. This (or things related to this) has been discussed in IMAP protocol mailing list. Basically it's not an error to use nonexistent UIDs. If you want details, ask in IMAP protocol ml and someone will probably explain.
Netcall Telecom Ltd Registered in England 2831215. Registered Office : 3rd Floor, Hamilton House, 111 Marlowes, Hemel Hempstead, Herts, HP1 1BB
Netcall Telecom Ltd Registered in England 2831215. Registered Office : 3rd Floor, Hamilton House, 111 Marlowes, Hemel Hempstead, Herts, HP1 1BB
On Mon, 2012-03-26 at 16:30 +0100, Attila Sipos wrote:
Thanks for your time. If you could possibly tell me how to know if an IMAP "UID COPY" is successful, I would appreciate it. Basically I'm moving a message from one folder to another. I thought I could issue a COPY command, check for success, then delete the email from the source folder.
What kind of an application are you building? Most IMAP clients would track the state of the mailbox, so they would already know if the UIDs exist or no before they do a COPY. And that's really the only solution for this.
If the client sees that some UID exists, but another session deletes it, the COPY will fail:
a fetch 1 uid
- 1 FETCH (UID 820) a OK Fetch completed. b uid copy 820 Trash
- 1 EXPUNGE b NO [EXPUNGEISSUED] Some of the requested messages no longer exist. c uid copy 820 Trash c OK No messages copied.
thanks. I find it odd that the 2nd copy attempt returns OK. I would've thought the "expungeissued" reason would still stand.
For how long does the reason persist? I suppose it only persists for enough time to issue a "NO" response?
Regards Attila
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi] Sent: 26 March 2012 16:38 To: Attila Sipos Cc: dovecot@dovecot.org Subject: Re: [Dovecot] dovecot-1.2.9: OK No messages copied
On Mon, 2012-03-26 at 16:30 +0100, Attila Sipos wrote:
Thanks for your time. If you could possibly tell me how to know if an IMAP "UID COPY" is successful, I would appreciate it. Basically I'm moving a message from one folder to another. I thought I could issue a COPY command, check for success, then delete the email from the source folder.
What kind of an application are you building? Most IMAP clients would track the state of the mailbox, so they would already know if the UIDs exist or no before they do a COPY. And that's really the only solution for this.
If the client sees that some UID exists, but another session deletes it, the COPY will fail:
a fetch 1 uid
- 1 FETCH (UID 820) a OK Fetch completed. b uid copy 820 Trash
- 1 EXPUNGE b NO [EXPUNGEISSUED] Some of the requested messages no longer exist. c uid copy 820 Trash c OK No messages copied.
Netcall Telecom Ltd Registered in England 2831215. Registered Office : 3rd Floor, Hamilton House, 111 Marlowes, Hemel Hempstead, Herts, HP1 1BB
Note how Dovecot sent the client EXPUNGE notification. Prior to that client knew that the message existed. After that client knows that the message no longer exists. It was only during the COPY command that client didn't know that the message had already been expunged.
On Mon, 2012-03-26 at 16:51 +0100, Attila Sipos wrote:
thanks. I find it odd that the 2nd copy attempt returns OK. I would've thought the "expungeissued" reason would still stand.
For how long does the reason persist? I suppose it only persists for enough time to issue a "NO" response?
Regards Attila
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi] Sent: 26 March 2012 16:38 To: Attila Sipos Cc: dovecot@dovecot.org Subject: Re: [Dovecot] dovecot-1.2.9: OK No messages copied
On Mon, 2012-03-26 at 16:30 +0100, Attila Sipos wrote:
Thanks for your time. If you could possibly tell me how to know if an IMAP "UID COPY" is successful, I would appreciate it. Basically I'm moving a message from one folder to another. I thought I could issue a COPY command, check for success, then delete the email from the source folder.
What kind of an application are you building? Most IMAP clients would track the state of the mailbox, so they would already know if the UIDs exist or no before they do a COPY. And that's really the only solution for this.
If the client sees that some UID exists, but another session deletes it, the COPY will fail:
a fetch 1 uid
- 1 FETCH (UID 820) a OK Fetch completed. b uid copy 820 Trash
- 1 EXPUNGE b NO [EXPUNGEISSUED] Some of the requested messages no longer exist. c uid copy 820 Trash c OK No messages copied.
Netcall Telecom Ltd Registered in England 2831215. Registered Office : 3rd Floor, Hamilton House, 111 Marlowes, Hemel Hempstead, Herts, HP1 1BB
participants (2)
-
Attila Sipos
-
Timo Sirainen