[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Expiration does not work + solution



I post the relevant fragments from my *imap-log*. The human-readable texts after
the status codes are in Czech (for some reason I don't understand, I'm not the
server admin). But I am sure you don't mind.

Unfortunately, at this moment it's not easy for me to reproduce the flag not
understood during expiration problem (at prev experimentations I've expired
almost every expirable mails). If it repeats in the future I'll post the log

Hope it helps,

-trung

>>>>> Simon Josefsson <jas@pdc.kth.se>:

> Trung Tran-Duc <trung.tranduc@prague.ixos.cz> writes:
> 
> > The obvious reason is nnimap uses two-digit years in the NOT SINCE search
> > clause and the IMAP server does not like it. The fix is really simple and I
> > think it should not break other IMAP servers
> 
> Thanks for the patch, I've applied it. RFC1730 permits 2 digit years
> so if your server list "IMAP4" as the first CAPABILITY symbol it
> should work (look athe the first 2-3 lines of *imap-log*), I guess
> Exchange is a IMAP4rev1 server then.

--8<--
* OK Server Microsoft Exchange IMAP4rev1 verze 5.5.2448.8 (brno.ixos.cz) je připraven.˙
1 CAPABILITY˙
* CAPABILITY IMAP4 IMAP4rev1 IDLE LITERAL+ LOGIN-REFERRALS MAILBOX-REFERRALS NAMESPACE AUTH=NTLM˙
1 OK Operace CAPABILITY je dokončena.˙
--8<--

> 
> > In *imap-log* I also see
> > ...
> > 37 UID STORE 2:14 -FLAGS (gnus-expire)
> > 37 BAD protocol error: "Invalid flags set for STORE command"
> > ...
> > 
> > It looks like nnimap tries to store a user-defined flag and the server refuses
> > to obey. Does nnimap gracefully fall back in this case?
> 
> Nnimap should never try to set/remove a user-defined flag unless the
> server tell us we can do that. Could you search backwards in
> *imap-log* for SELECT and tell us what it looks like?

--8<--
16 SELECT list.nnimap˙
* 14 EXISTS˙
* 0 RECENT˙
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft)˙
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft)]˙
* OK [UNSEEN 13] Je první nepřečtená zpráva˙
* OK [UIDVALIDITY 755] Hodnota UIDVALIDITY.˙
16 OK [READ-WRITE] Operace SELECT je dokončena.˙
--8<--

> 
> The "\*" in the PERMANENTFLAGS line below signals that the server
> accept user-defined flags.
> 
> 268 SELECT INBOX.nnimap
> * FLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-expire gnus-save)
> * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen gnus-expire gnus-save \*)]
> * 56 EXISTS
> * 0 RECENT
> * OK [UNSEEN 55]
> * OK [UIDVALIDITY 908992622]
> 268 OK [READ-WRITE] Completed
> 
> Hm. Just before that line in *imap-log*, was any of article 2-14 just
> expired? There is a known bug in nnimap that make it remove flags on
> articles that has been removed. I think the server is supposed to just
> silently ignore thoose but perhaps it doesn't.