Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: Limiting number of Incomingxxxx mails
       [not found] <xeq3r8abqkpm.fsf@desh.cisco.com>
@ 2003-02-14 13:19 ` Reiner Steib
  2003-02-14 14:05   ` Frank Schmitt
  2003-02-17  4:56   ` Sriram Karra
  0 siblings, 2 replies; 3+ messages in thread
From: Reiner Steib @ 2003-02-14 13:19 UTC (permalink / raw)


On Fri, Feb 14 2003, Sriram Karra wrote:

[ ~/Mail/Incomingxxx ]
> What I am looking for is some way to tweak this feature such that it
> will not take up too much disk space.  (Recently I noticed that these
> files accounted for ~65% of the size of ~/Mail/ :)
>
> What variables should I be looking at?

I'm not aware of any predefined functionality in Gnus to do this.

As you're using Unix, you may do something like this:

(defun rs-gnus-remove-old-mail-source (&optional age)
  "Remove incoming files older than AGE days."
  (interactive "P")
  (let ((def-age 7) cmd)
    (setq age (number-to-string (if (and (numberp 'age) (> age 0))
				    age
				  def-age)))
    (setq cmd
	  (concat "find " mail-source-directory
		  mail-source-incoming-file-prefix "* "
		  "-mtime +" age " -exec echo rm {} \\;"))
    ;; "echo" only for testing ..........^^^^
    (gnus-message 8 "Removing incoming files older than %s day(s)..." age)
    (gnus-message 8 "Running shell command `%s'..." cmd)
    (shell-command cmd)))

Remove the "echo" if you're sure it works. ;-) See the *Message*
buffer.

You can put this in an appropriate hook, e.g. `gnus-exit-gnus-hook'.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/


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

* Re: Limiting number of Incomingxxxx mails
  2003-02-14 13:19 ` Limiting number of Incomingxxxx mails Reiner Steib
@ 2003-02-14 14:05   ` Frank Schmitt
  2003-02-17  4:56   ` Sriram Karra
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Schmitt @ 2003-02-14 14:05 UTC (permalink / raw)


Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

> On Fri, Feb 14 2003, Sriram Karra wrote:
>
> [ ~/Mail/Incomingxxx ]
>> What I am looking for is some way to tweak this feature such that it
>> will not take up too much disk space.  (Recently I noticed that these
>> files accounted for ~65% of the size of ~/Mail/ :)
>>
>> What variables should I be looking at?
>
> I'm not aware of any predefined functionality in Gnus to do this.

WIBNIG had an option to automatically compress those files when storing
them on disk?

-- 
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.


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

* Re: Limiting number of Incomingxxxx mails
  2003-02-14 13:19 ` Limiting number of Incomingxxxx mails Reiner Steib
  2003-02-14 14:05   ` Frank Schmitt
@ 2003-02-17  4:56   ` Sriram Karra
  1 sibling, 0 replies; 3+ messages in thread
From: Sriram Karra @ 2003-02-17  4:56 UTC (permalink / raw)


Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

> On Fri, Feb 14 2003, Sriram Karra wrote:
>
> [ ~/Mail/Incomingxxx ]
>> What I am looking for is some way to tweak this feature such that it
>> will not take up too much disk space.  (Recently I noticed that these
>> files accounted for ~65% of the size of ~/Mail/ :)
>>
>> What variables should I be looking at?
>
> I'm not aware of any predefined functionality in Gnus to do this.
>

OK; in which case I guess a variant of the following could be
considered for commit?

> As you're using Unix, you may do something like this:
>
> (defun rs-gnus-remove-old-mail-source (&optional age)
>   "Remove incoming files older than AGE days."
>   (interactive "P")
>   (let ((def-age 7) cmd)
>     (setq age (number-to-string (if (and (numberp 'age) (> age 0))
> 				    age
> 				  def-age)))
>     (setq cmd
> 	  (concat "find " mail-source-directory
> 		  mail-source-incoming-file-prefix "* "
> 		  "-mtime +" age " -exec echo rm {} \\;"))

How about  ......................" -print | xargs echo rm "

That would be much faster.

But it would still be too slow to be put in some hook.  I guess a
standalone *Group* buffer command should be good enough.

Thanks,
-Sriram.

-- 
Well, all's well that ends.


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

end of thread, other threads:[~2003-02-17  4:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <xeq3r8abqkpm.fsf@desh.cisco.com>
2003-02-14 13:19 ` Limiting number of Incomingxxxx mails Reiner Steib
2003-02-14 14:05   ` Frank Schmitt
2003-02-17  4:56   ` Sriram Karra

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