T.A.Meyer at massey.ac.nz
Mon Jun 23 13:55:33 EDT 2003
> > Invalid response to append:
> > ('NO', ['APPEND failed: Unknown flag: NotJunk'])
> I think this has to do with the server returning flags without their
> leading backslash, but only accepting them with the backslash.
> Spambayes passes the flags back exactly as it receives them.
Only system flags (and extensions) should have the leading backslash
('seen', 'draft', and so on). 'Keyword' flags like 'NotJunk' should not
have the leading backslash. Either way, according to the RFC, both the
fetch response and the append command should have them in the same
I think this must be a case where the 'NotJunk' flag is a flag, but not
a permanentflag. The RFC says that:
Any flags that are in the
FLAGS untagged response, but not the PERMANENTFLAGS
list, can not be set permanently. If the client
attempts to STORE a flag that is not in the
PERMANENTFLAGS list, the server will either reject
it with a NO reply or store the state for the
remainder of the current session only.
This seems to fit the behaviour. I guess the correct behaviour is to
check for a PERMANENTFLAGS response before appending the flags, and
removing any flags that are in both sets. The way to check this would
be to see if 'NotJunk' is indeed missing from a PERMANENTFLAGS response
(the -i4 switch is good for this). If Barry feels like it he could
patch this in, otherwise I'll try and get to it sometime.
More information about the Spambayes