Gnus development mailing list
 help / color / mirror / Atom feed
* total-expire based on msg count
@ 2010-03-12  0:20 Harry Putnam
  2010-03-19 19:45 ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Harry Putnam @ 2010-03-12  0:20 UTC (permalink / raw)
  To: ding

I know how to make total-expire happen by how many days old the
message is, but would like to expire certain groups according to msg
count. 
So, put another way, I want to keep some groups messages for a time but
not if its above a set number of messages.

I've been doing this with a shell script, but the groups were nndir
and were not expected to have accurate nov records.
So the shell script came in every few days, counted the messages and
if they were above a set number, it would delete the oldest messages
until the desired count was once more attained.

I've since converted those groups to nnml, where gnus gets more
annoyed if I do things behind its back, but it looks like it might be
harder to get the same result using gnus native functionality.

I was setting up some rules in agent-parameters when I realized using
the number of days could lead to message count way way higher than I'm
willing to store.
  
I haven't really used it yet but it looks like:

  (setq gnus-parameters
        '(("_ex$"
  ;;    '(("[Ss]pam[0-9]*$\\|_ex$"
           (total-expire . t)
           (expiry-wait . 18))
          ("_tr$"
           (total-expire . t)
           (expiry-wait . 90)
           (gnus-visible-headers
            (concat gnus-visible-headers "\\|^X-Spam-Report:.*_FARAWAY_"))
          ("_$"
           (total-expire . t)
           (expiry-wait . 340)))))

Those settings (assuming its not riddled with errors) might easily
lead to a really huge mail directory in some cases, say if a group
started being considerably more active than it currently is.

How can I make total-expiry depend on article count?  Maybe some kind
of tricky scoring setup?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: total-expire based on msg count
  2010-03-12  0:20 total-expire based on msg count Harry Putnam
@ 2010-03-19 19:45 ` Ted Zlatanov
  2010-03-22 19:30   ` Harry Putnam
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2010-03-19 19:45 UTC (permalink / raw)
  To: ding

On Thu, 11 Mar 2010 18:20:28 -0600 Harry Putnam <reader@newsguy.com> wrote: 

HP> I've since converted those groups to nnml, where gnus gets more
HP> annoyed if I do things behind its back, but it looks like it might be
HP> harder to get the same result using gnus native functionality.

I think you'll be happier with nnmaildir.  It's designed for sharing and
Gnus doesn't mind.  So you could have your external script delete
messages without a Gnus problem.

HP> I was setting up some rules in agent-parameters when I realized using
HP> the number of days could lead to message count way way higher than I'm
HP> willing to store.
...
HP> How can I make total-expiry depend on article count?  Maybe some kind
HP> of tricky scoring setup?

Sorry, I don't know the answer.  It's definitely not available in Gnus
today but may not be too hard to write.

Ted




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: total-expire based on msg count
  2010-03-19 19:45 ` Ted Zlatanov
@ 2010-03-22 19:30   ` Harry Putnam
  2010-03-22 19:43     ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Harry Putnam @ 2010-03-22 19:30 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Thu, 11 Mar 2010 18:20:28 -0600 Harry Putnam <reader@newsguy.com> wrote: 
>
> HP> I've since converted those groups to nnml, where gnus gets more
> HP> annoyed if I do things behind its back, but it looks like it might be
> HP> harder to get the same result using gnus native functionality.
>
> I think you'll be happier with nnmaildir.  It's designed for sharing and
> Gnus doesn't mind.  So you could have your external script delete
> messages without a Gnus problem.

That may be true... I tried nnmaildir once quite some time ago and
hated the really clunky file names.  If you handle any of it by hand
those names get to be a pain in the butt very soon.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: total-expire based on msg count
  2010-03-22 19:30   ` Harry Putnam
@ 2010-03-22 19:43     ` Ted Zlatanov
  0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2010-03-22 19:43 UTC (permalink / raw)
  To: ding

On Mon, 22 Mar 2010 14:30:33 -0500 Harry Putnam <reader@newsguy.com> wrote: 

HP> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Thu, 11 Mar 2010 18:20:28 -0600 Harry Putnam <reader@newsguy.com> wrote: 
>> 
HP> I've since converted those groups to nnml, where gnus gets more
HP> annoyed if I do things behind its back, but it looks like it might be
HP> harder to get the same result using gnus native functionality.
>> 
>> I think you'll be happier with nnmaildir.  It's designed for sharing and
>> Gnus doesn't mind.  So you could have your external script delete
>> messages without a Gnus problem.

HP> That may be true... I tried nnmaildir once quite some time ago and
HP> hated the really clunky file names.  If you handle any of it by hand
HP> those names get to be a pain in the butt very soon.

It's been OK for me with judicious use of `find' and `ack' but I like
Perl so my sense of aesthetics is obviously skewed ;)

Ted




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-22 19:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12  0:20 total-expire based on msg count Harry Putnam
2010-03-19 19:45 ` Ted Zlatanov
2010-03-22 19:30   ` Harry Putnam
2010-03-22 19:43     ` Ted Zlatanov

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).