Great Circle Associates Majordomo-Workers
(May 1998)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Modules for archive manipulation?
From: Manar Hussain <manar @ ivision . co . uk>
Date: Thu, 28 May 1998 15:35:48 +0100
To: Majordomo-Workers @ GreatCircle . COM
In-reply-to: <19980528081800.A29156@risc.sps.mot.com>
References: <356D4EF8.AACCD9EE@Golux.Com><98052614070304@nephi.zko.dec.com><356D4EF8.AACCD9EE@Golux.Com>

>> Does anyone know of any Perl modules for manipulating files in the
>> archive2 format?  Not for rewriting, just for processing message by
>> message and noting lengths and lseek offsets for each..
>
>Since they are just mbox folders, try CPAN for MailFolder and maybe
>MailTools.

There should be loads of stuff to do this in perl as hinted. There's also
purgmbox which will be in C. The following were posted to a mailing list
some time ago:

>About a week ago, someone asked about a tool to edit user
>mailboxes.  I noted I had a tool that did this with an eye
>to imposing a limit on user mailboxes, and volunteered to
>send the program and/or source code to those who asked.
>Little did I know what would happen to my inbox!
>
>I've cleaned up the source a bit, written a small man page
>and package-aware makefile, and posted the FreeBSD package
>and matching source in:
>  <ftp://ftp.us.net/pub/unix/freebsd/purgmbox-1.0.tgz>
>  <ftp://ftp.us.net/pub/unix/freebsd/purgmbox-1.0src.tgz>
>The package is linked with /usr/lib/compat, so it should
>work on both 2.2.x and 2.1.x systems.
>
>This uses flock(2) on the mailbox; I don't know if it's
>needed, but I'd rather have more than less.  Please let
>me know if this bites you.

AND

>$ purgmbox ?
>Purpose: Purge old mail items from Unix mailbox files
>Usage: purgmbox [-opts] mbox ...
>  -fname   - Purge messages From name
>  -lfile   - Log messages to 'file'
>  -onn     - Purge messages older than nn days
>  -snn     - Purge until mailbox smaller than nn kbytes
>  -v ...   - Verbose; Print summary. Repeat for more detail
>  mbox     - One or more mailbox files
>Members of the same login group may purge each other's mailboxes.
>
>It can (but doesn't have to be) installed set-gid mail; and if
>so is real careful.  That last feature can be #defined away.
>It's a single pass.  Designed to be called from cron as:
>
>  find /var/mail -type f | xargs purgmbox -o90 -s512
>
>It was a piece of a larger system, so has an extra function
>or two to handle more logging than usually done (-l flag).
>Oritinally written for HP-UX 9.x, I think; needs SysV-style
>postmarks on mail items; does lockf(); needs mktime();


Both from:

>John Woodruff, Sr. Network Engineer, US Net - 301-572-5926
>Washington/Baltimore/Richmond ISP - $6.95/month for full PPP!

I'd check out the mailing list archives on www.freebsd.org if you wanted
his email address ...


References:
Indexed By Date Previous: Re: Modules for archive manipulation?
From: Dave Wolfe <dwolfe@risc.sps.mot.com>
Next: Re: Posting ACK
From: Brock Rozen <brozen@torah.org>
Indexed By Thread Previous: Re: Modules for archive manipulation?
From: Dave Wolfe <dwolfe@risc.sps.mot.com>
Next: Test
From: tibbs@math.uh.edu

Google
 
Search Internet Search www.greatcircle.com