Gnus development mailing list
 help / color / mirror / Atom feed
From: ding_gnus.org@sumou.com
To: ding@lists.math.uh.edu
Subject: Using cache to read IMAP mail offline, with proper deletion of Spam
Date: Tue, 23 Jun 2009 13:17:42 +0400	[thread overview]
Message-ID: <87k533pavd.fsf@porzhiz.org> (raw)

Hello:

I've been searching and experimenting very hard, however not with 100%
results, perhaps someone can help me.

What I want to do:

1. Use Gnus to access my mail via IMAP.
2. Store every read message in the cache, so that when I'm offline I can
reread it.
3. Purge all deleted messages properly.

It's the third part that I cannot get to work properly, requiring
cumbersome deletion.

I have the following .emacs settings, relevant to the above points:

(setq gnus-select-method '(nnimap "SERVER.ADDRESS"
				  (nnimap-address "SERVER.ADDRESS")
				  )
      )
(setq gnus-use-cache t)
(setq gnus-cache-enter-articles '(read ticked dormant))
(setq gnus-cache-remove-articles '(unread))

The above sets the cache, so that emails that I read when online get
downloaded and don't have to be redownloaded the next time I access
mail, allowing for offline reading when not online.

The ones that are for instance read, and seen as spam, are then marked
unread, and should exit the cache because of the last line above.

What this results in.

To delete files also from the server, so that they are not kept
in the cache and stick around forever, I have to follow the
following steps:
1. Read the emails.
2. Mark them as expirable with `E'.
3. Delete all expired items with `B M-C-E'.
4. Exit the Summary Buffer to the Group Buffer with `q'.
5. Enter the mailbox again.
6. Display all the mails with `/ o' to display also the read
    emails, this will display also the expired/deleted items,
    which have still been kept in the cache.
7. Read each of the emails and mark it unread with `M-u'.
8. Exit the Summary Buffer to the Group Buffer with `q' again.
9. Update the Group Buffer with `g'.
This then, and only this, deletes the expired/deleted emails and remove them
from the local cache. The items will be deleted from the IMAP
server and locally, thus disappear everywhere.

It's an uncomfortable hack, but I've found no better way so
far to be able to utilize the cache, so big mails don't have
to be redownloaded upon every reconnect.

How I can I set it, so that when mails are marked as expirable with `E'
and then expundeg with `B M-C-E' they don't stick around and have to be
opened and un-read, but are deleted? Does anyone know?

Thank you.

ShiroiKuma



             reply	other threads:[~2009-06-23  9:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23  9:17 ding_gnus.org [this message]
2009-07-08 19:01 ` Ted Zlatanov
2009-07-09  8:58   ` Unknown
2009-07-09 16:09     ` Ted Zlatanov
2009-07-11 20:07       ` 白い熊
2009-07-13 19:22         ` Ted Zlatanov
2009-07-14  6:14 白い熊
2009-07-15 16:18 ` Ted Zlatanov
2009-07-16  8:20   ` 白い熊
2009-07-17  9:32     ` 白い熊
2009-07-22 12:49 白い熊

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=87k533pavd.fsf@porzhiz.org \
    --to=ding_gnus.org@sumou.com \
    --cc=ding@lists.math.uh.edu \
    /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).