[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Expiration does not work + solution
I am using Pgnus 0.80 + nnimap 0.94 + M$ Exchange 5.5.
My nnmail-expiry-wait is set to 7 days (the default)
Expiration does not work. This is from *imap-log*
....
35 UID SEARCH UID 2:14,17:18,21:26 NOT SINCE 16-Mar-99
35 BAD .....
...
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
--8<--
;;
;; from nnimap.el
;;
(defun nnimap-date-days-ago (daysago)
"Return date, in format \"3-Aug-98\", for DAYSAGO days ago."
;; 1999-03-23 Trung Tran-Duc <trung.tranduc@prague.ixos.cz>
;; 3-Aug-98 is bad, MS Exchange refuses to take this date
;; should be 3-Aug-1998
(let ((date (format-time-string "%d-%b-%Y" ;was "%d-%b-%y"
(nnimap-time-substract
(current-time)
(if (fboundp 'days-to-time)
(days-to-time daysago)
(nnmail-days-to-time daysago))))))
(if (eq ?0 (string-to-char date))
(substring date 1)
date)))
--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?
-trung