Hi folks, I'm trying to expire some of my mails with 'immediate with nnimap, but I think it actually does not really work. It only work with mail that are before yesterday. I see the following as the potential problem: (defun nnimap-find-expired-articles (group) (let ((cutoff (nnmail-expired-article-p group nil nil))) (when cutoff (with-current-buffer (nnimap-buffer) (let ((result (nnimap-command "UID SEARCH SENTBEFORE %s" (format-time-string (format "%%d-%s-%%Y" (upcase (car (rassoc (nth 4 (decode-time cutoff)) parse-time-months)))) cutoff)))) (and (car result) (delete 0 (mapcar #'string-to-number (cdr (assoc "SEARCH" (cdr result))))))))))) If `nnmail-expiry-wait` is 'immediate then (nnmail-expired-article-p group nil nil) returns (current-time), which is translated in e.g. 13-JAN-2017 by `nnimap-find-expired-articles`. So if the message is expired today, well, it does no seem to work. Sounds like a little bug to me, and I'm hoping that someone will help me fixing it before I commit random garbage to the trunk. ;-) It has been a long time since I played on that! -- Julien Danjou # Free Software hacker # https://julien.danjou.info