From: Gregory Novak <novak@ucolick.org>
Subject: Re: Resent message
Date: Wed, 14 Dec 2005 13:37:57 -0800 [thread overview]
Message-ID: <m2mzj32wcq.fsf@euterpe.local> (raw)
In-Reply-To: <m27ja74bq0.fsf@euterpe.local> (Gregory Novak's message of "Wed, 14 Dec 2005 13:20:39 -0800")
>> 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
parent reply other threads:[~2005-12-14 21:37 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <m27ja74bq0.fsf@euterpe.local>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2mzj32wcq.fsf@euterpe.local \
--to=novak@ucolick.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).