* Re: Resent message
[not found] <m27ja74bq0.fsf@euterpe.local>
@ 2005-12-14 21:37 ` Gregory Novak
0 siblings, 0 replies; only message in thread
From: Gregory Novak @ 2005-12-14 21:37 UTC (permalink / raw)
>> I am using Gnus to read e-mail via the nnimap backend. When I mark an
>> email as expirable in my INBOX and then quit the group, it gets filed
>> into a folder with the name recd-mail-2005-12 (for example; code
>> attached below).
>
> There were no code attached. How do you expire it into
> recd-mail-2005-12?
Ah, yes, sorry.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Recd mail archiving
(setq gnus-auto-expirable-newsgroups "LIST"
nnmail-expiry-target 'gsn/gnus-expiry-target
nnmail-expiry-wait-function 'gsn/nnmail-expiry-wait-function)
(defun gsn/gnus-archive-p (group)
"Given an unadorned string group name, decide if the group
should be archived into recd-mail"
(let ((case-fold-search nil))
(string-match "\\(^INBOX$\\|^INBOX.IN\\)" group)))
(defun gsn/nnmail-expiry-wait-function (group)
"Expire recd-mail archived groups immediately;
Delete auto-expirable groups (list mail) after 14 days;
Never delete anything else."
(cond ((gsn/gnus-archive-p group) 'immediate)
((let ((case-fold-search nil)) ; Might try gnus-auto-expirable-group-p
(string-match gnus-auto-expirable-newsgroups group)) 14)
(t 'never)))
(defun gsn/gnus-expiry-target (group)
"if the mail is to be archived into recd-mail, return a folder in which
to archive the message by calling gsn/gnus-article-get-expiry-target.
If not, delete the message.
Lifted from http://www.emacswiki.org/cgi-bin/wiki/ArchivingMail"
(if (gsn/gnus-archive-p group)
(gsn/gnus-article-get-expiry-target)
'delete))
(defun gsn/gnus-article-get-expiry-target ()
"Extracts the date from the current article and converts it to a
folder name to which to archive the message of the form
nnimap+lick:INBOX.recd-mail-YYYY-MM.
Lifted from http://www.emacswiki.org/cgi-bin/wiki/ArchivingMail"
(save-window-excursion
(when (string= major-mode "gnus-summary-mode")
(gnus-summary-select-article-buffer))
(goto-char (point-min))
(concat "nnimap+lick:INBOX.recd-mail-"
(format-time-string
"%Y-%m"
(gnus-date-get-time (message-fetch-field "date"))))))
> Perhaps (setq imap-log t) will help. Then you should be able to see
> if Gnus is asking the server to remove the "gnus-expire" flag on the
> article in question, and whether it later somehow end up adding that
> flag again to the article when it has moved to recd-mail-2005-12.
Ok, this helps a lot. I see that the server is doing something with
the gnus-expire flag, so evidently the flags are stored on the imap
server. When I have a moment I'll look in detail at exactly what's
going on.
The problem was ameliorated for me when I figured out how to prevent
Gnus from deleting stuff from my "archive" groups where recd mail and
other stuff is stored. But maybe this weekend I'll have a look at
what's going on and try to report back.
Thanks,
Greg
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-12-14 21:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <m27ja74bq0.fsf@euterpe.local>
2005-12-14 21:37 ` Resent message Gregory Novak
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).