(require 'gnus)
(require 'nnoo)
(require 'netrc)
+(require 'parse-time)
(nnoo-declare nnimap)
(defvoo nnimap-inbox nil
"The mail box where incoming mail arrives and should be split out of.")
-(defvoo nnimap-expunge-inbox nil
- "If non-nil, expunge the inbox after fetching mail.
-This is always done if the server supports UID EXPUNGE, but it's
-not done by default on servers that doesn't support that command.")
-
(defvoo nnimap-authenticator nil
"How nnimap authenticate itself to the server.
Possible choices are nil (use default methods) or `anonymous'.")
likely value would be \"text/\" to automatically fetch all
textual parts.")
-(defvoo nnimap-expunge nil)
+(defvoo nnimap-expunge t
+ "If non-nil, expunge articles after deleting them.
+This is always done if the server supports UID EXPUNGE, but it's
+not done by default on servers that doesn't support that command.")
+
(defvoo nnimap-connection-alist nil)
deleted-articles))
(defun nnimap-find-expired-articles (group)
- (let ((cutoff (nnmail-expired-article-p
- group nil nil nnml-inhibit-expiry)))
+ (let ((cutoff (nnmail-expired-article-p group nil nil)))
(with-current-buffer (nnimap-buffer)
(let ((result
(nnimap-command
t)
(nnimap-expunge
(nnimap-command "EXPUNGE")
- t))))
+ t)
+ (t (gnus-message 7 (concat "nnimap: nnimap-expunge is not set and the "
+ "server doesn't support UIDPLUS, so we won't "
+ "delete this article now"))))))
(deffoo nnimap-request-scan (&optional group server)
(when (and (nnimap-possibly-change-group nil server)
(setq sequence (nnimap-send-command "UID EXPUNGE %s" range)))
;; If it doesn't support UID EXPUNGE, then we only expunge if the
;; user has configured it.
- (nnimap-expunge-inbox
+ (nnimap-expunge
(setq sequence (nnimap-send-command "EXPUNGE"))))
- (nnimap-wait-for-sequence sequence))))
+ (nnimap-wait-for-response sequence))))
(defun nnimap-parse-copied-articles (sequences)
(let (sequence copied range)