[imp] Set flags not working (IMP5 + mailenable)
Michael M Slusarz
slusarz at horde.org
Fri Jan 11 02:44:48 UTC 2013
Quoting welliton at infonet.com.br:
> Hello guys,
>
> I'm trying to setup IMP5 (H4) with a mailenable imap server as backend, but
> the setting flag imap command isn't working. Analysing the imap log
> generated by IMP, I can see these commands:
[snip]
> C: 4 UID STORE 6 +FLAGS \seen
> S: * 4 FETCH (FLAGS (\SEEN) UID 6)
> S: 4 OK UID command completed
Looks like IMP is working just fine here. UID 6 is flagged with the
seen flag, just like what was asked.
> C:SELECT INBOX
> S: * FLAGS (\Deleted \Seen \Answered \Flagged \Draft $Forwarded)
> C:UID STORE 6 +Flags(\SEEN)
> S: UID command completed
That is incorrect. There MUST be a space between [+-]Flags and the
flag (or flag-list).
> Comparing both logs, i could realize that the only difference is that the
> flag is in brackets, so I tried open a TELNET session with the mailenable
> imap server and the setting flag command only works when the flag is in
> brackets. Here are the commands:
[snip]
> 3 UID STORE 10 +FLAGS\SEEN
> * 8 FETCH (FLAGS () UID 10) ----------> here doesn't work.
> 3 OK UID command completed
This is incorrect syntax. It should be:
3 UID STORE 10 +FLAGS \SEEN
The server should have returned a BAD response due to the incorrect
syntax in the STORE command. i.e. Dovecot 2.1 looks like this:
1 uid store 10 +FLAGS\SEEN
1 BAD Error in IMAP command UID STORE: Invalid arguments.
> 4 UID STORE 10 +FLAGS (\SEEN)
> * 8 FETCH (FLAGS (\SEEN) UID 10) ----------> here works.
> 4 OK UID command completed
Yes. this is correct. This is also an equivalent statement:
4 UID STORE 10 +FLAGS \SEEN
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the imp
mailing list