Re: Archiver Cron Jobs

2007-02-27 Thread Stephen
On Tue, Feb 27, 2007 at 12:13:11AM -0500 or thereabouts, Michael Pobega wrote:
 I'm pretty new to cron jobs, and I've just started playing around with
 them pretty recently.

Hi Michael:

Cool.

 I'd like to be able to create a cron job that does a weekly archive of
 all of my folders in ~/mail. The way I have my mail set up is one
 folder per box, for example my folders are:
 
 ~/mail/inbox
 ~/mail/debian-user
 ~/mail/sent
 
 I'd like the Cron job to archive these on a weekly basis, but not
 exactly on a weekly basis.

Instead of reinventing the wheel; Why not use something like
archivemail?

# aptitude show archivemail
Package: archivemail
State: installed
Automatically installed: no
Version: 0.7.0-1
Priority: optional
Section: mail
Maintainer: Joey Hess [EMAIL PROTECTED]
Uncompressed Size: 139k
Depends: python
Description: 
archive and compress your old email
Archivemail moves old mail out of a mailbox (in Maildir, MH, or
mbox format, or via IMAP) and archives it in a compressed 
mbox-format mailbox file. It is well suited to be run from cron 
for
automatic archiving of your old mail.

It runs via cron as well, and the included  readmes will help you set
the syntax up for whatever time period floats yer boat.


-- 
Regards
Stephen A.
   
Encrypted/Signed e-mail accepted (GPG or PGP) -- Key ID: 978BA045
+
Having nothing, nothing can he lose.
-- William Shakespeare, Henry VI
+


signature.asc
Description: Digital signature


Re: Archiver Cron Jobs

2007-02-27 Thread Michael Pobega
On Tue, Feb 27, 2007 at 09:34:04AM -0500, Stephen wrote:
 On Tue, Feb 27, 2007 at 12:13:11AM -0500 or thereabouts, Michael Pobega wrote:
  I'd like to be able to create a cron job that does a weekly archive of
  all of my folders in ~/mail. The way I have my mail set up is one
  folder per box, for example my folders are:
  
  ~/mail/inbox
  ~/mail/debian-user
  ~/mail/sent
  
  I'd like the Cron job to archive these on a weekly basis, but not
  exactly on a weekly basis.
 
 Instead of reinventing the wheel; Why not use something like
 archivemail?
 
   # aptitude show archivemail
   Package: archivemail
   State: installed
   Automatically installed: no
   Version: 0.7.0-1
   Priority: optional
   Section: mail
   Maintainer: Joey Hess [EMAIL PROTECTED]
   Uncompressed Size: 139k
   Depends: python
   Description: 
   archive and compress your old email
   Archivemail moves old mail out of a mailbox (in Maildir, MH, or
   mbox format, or via IMAP) and archives it in a compressed 
   mbox-format mailbox file. It is well suited to be run from cron for
   automatic archiving of your old mail.
 

Wow, nice find! I'll definitely toy around with this sometime today.

Oh, and it's in maildir format, since that's the only way I could get
Mutt to do what I wanted (Mbox didn't seem to work right the way I was
trying to set it up, although I don't mind using maildir instead of
mbox).


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Archiver Cron Jobs

2007-02-26 Thread Michael Pobega
I'm pretty new to cron jobs, and I've just started playing around with
them pretty recently.

I'd like to be able to create a cron job that does a weekly archive of
all of my folders in ~/mail. The way I have my mail set up is one
folder per box, for example my folders are:

~/mail/inbox
~/mail/debian-user
~/mail/sent

I'd like the Cron job to archive these on a weekly basis, but not
exactly on a weekly basis.

The part that is tough for me to figure out is...I want the cron job
to only archive when the file is a week old. So I'd need it to do a
daily check of my folders and their contents (And the dates they were
created), and if they're older than seven days old move them into
~/mail/archives/folder (Archive would be a mirror image of the
directories in ~/mail).

I imagine something like this can be done in bash or similar, but I
have no experience doing bash.

Thanks for your time,
Michael Pobega


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Archiver Cron Jobs

2007-02-26 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/26/07 23:13, Michael Pobega wrote:
 I'm pretty new to cron jobs, and I've just started playing around with
 them pretty recently.
 
 I'd like to be able to create a cron job that does a weekly archive of
 all of my folders in ~/mail. The way I have my mail set up is one
 folder per box, for example my folders are:
 
 ~/mail/inbox
 ~/mail/debian-user
 ~/mail/sent

These are mbox files?

It would help see the complete directory structure.

 I'd like the Cron job to archive these on a weekly basis, but not
 exactly on a weekly basis.
 
 The part that is tough for me to figure out is...I want the cron job
 to only archive when the file is a week old. So I'd need it to do a
 daily check of my folders and their contents (And the dates they were
 created), and if they're older than seven days old move them into
 ~/mail/archives/folder (Archive would be a mirror image of the
 directories in ~/mail).

If these are mbox files, there will be a problem if you try to
Receive new emails (or compact folders or move mails from folder to
folder, etc) while the job happens to be running.

 I imagine something like this can be done in bash or similar, but I
 have no experience doing bash.

Yes, but... there's always a spanner in the gears.


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF48BpS9HxQb37XmcRAlDUAJ9SyoPnO1YWn6aZy83wZHxUdtHmqwCglhCa
eVWvzt9EIToQmBD+kKwFSe8=
=jz4t
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]