* Immediate expire on imap
@ 2017-01-13 11:22 Julien Danjou
0 siblings, 0 replies; only message in thread
From: Julien Danjou @ 2017-01-13 11:22 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-13 11:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 11:22 Immediate expire on imap Julien Danjou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).