Mail archiving scripts?

2001-04-04 Thread Neil Ford

Following on from recent topics, can anyone point me at any scripts to help
with breaking up mailbox files?

I did have one, but that used the From field which unfortunately get's munged
if you use Formail/Procmail to reprosses a mailbox. Ideally I'm looking for
something that uses the Date: field and would take as input a month and year,
e.g.: March 2001, a mailbox, e.g.: london-pm and create a new file of the 
mails matching those criteria, suitably named, say london-pm.2001.03.

Pointers to something suitable are fine but please bear in mind my perl is
rudimentary... okay it's non-existent :-)

Neil.



Re: Mail archiving scripts?

2001-04-04 Thread Jonathan Stowe

On Wed, 4 Apr 2001, Neil Ford wrote:

 Following on from recent topics, can anyone point me at any scripts to help
 with breaking up mailbox files?

Mr Barr's mailtools have all the gubbins required - available from your
local CPAN :)

#!/usr/bin/perl -w

use strict;

use Mail::Util qw(read_mbox);
use Mail::Internet;
use Mail::Header;
my $mess_list = read_mbox('/var/spool/mail/gellyfish') || die "Aieee\n";
foreach my $message (@{$mess_list} )
{
   my $mail = Mail::Internet-new($message);
   my $head = $mail-head; # A Mail::Header;
   print "Mail from : ",$head-get('From'),
 " Subject : ", $head-get('Subject'),"\n";
   foreach my $body_line (@{$mail-body})
{
  print $body_line;
}
}

For instance ...

/J\





Re: Mail archiving scripts?

2001-04-04 Thread Simon Cozens

On Wed, Apr 04, 2001 at 10:50:34PM +0100, Neil Ford wrote:
 Following on from recent topics, can anyone point me at any scripts to help
 with breaking up mailbox files?

This is what I do:

Use Mail::Audit in a loop over the mailbox, doing something like this:

 my ($y, $m) = (localtime)[5,4];
 my $date = sprintf("%04d%02d", $y+1900, $m+1);
 
 my %lists = (
regexp = "listname",
...
 );

for my $what (keys %lists) {
  my $where = $lists{$what};
  if ($from =~ /$what/i or $to =~ /$what/i or $cc =~/$what/i) {
$item-accept($folder.$where."-$date");
return;
  }
}
 
This means your mail gets filed to boxes like "london.pm-200104".
If you're using Mail::Audit for your incoming mail, this solution will
mean that new mail automatically gets filed to month-stamped mailboxes
as it comes in. When mutt scans your mailbox directory for new mail, it'll
pick up the new mailbox at the beginning of the month. Neat, eh? :)

-- 
} /* the next line is indented funny to preserve old indentation */
- plan9 has a bad day



Re: archiving

2001-04-03 Thread Robin Houston

On Tue, Apr 03, 2001 at 01:36:54PM +0100, Greg McCarroll wrote:
 
 Did you all know that i used to blow up pressurised butane
 cannisters as a child?

We *all* used to do *that* :-)

 .robin.

-- 
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal--Panama!
--Guy Jacobson



Re: archiving

2001-04-03 Thread Greg McCarroll

* Andrew Bowman ([EMAIL PROTECTED]) wrote:
  From:   Greg McCarroll [SMTP:[EMAIL PROTECTED]]
  Did you all know that i used to blow up pressurised butane
  cannisters as a child?
 
 I guess that goes with the accent Greg ;-)
 
 If you hadn't discovered Perl goodness knows what you'd be doing now...
 

Blowing up members of the conservative party no doubt  

Curse you Perl! ;-)

[
  I don't want to hear any crap about this one liner from anyone,
  if you try to flame me about it i'm going to stick my hands over
  my ears and say `La la la, I can't hear you, La la la', Ok?
]

 Andrew.
 
 P.S. Did you do the old WD40 flamethrower trick too?

childs play, however beyond pressurised flammable substances, i remember
a particular stroke of genius from a northern irish camp site, where
they had a diesel tank near the camp site, sure it was in the forest,
but 20 yards beyond the tree line is not going to stop a pile of 
young northern irish arsenists.

ah great and dangerous days,

Greg

-- 
Greg McCarroll  http://www.mccarroll.uklinux.net




Re: archiving

2001-04-03 Thread Struan Donald

* at 03/04 13:55 +0100 Greg McCarroll said:
 * Robin Houston ([EMAIL PROTECTED]) wrote:
  On Tue, Apr 03, 2001 at 01:36:54PM +0100, Greg McCarroll wrote:
   
   Did you all know that i used to blow up pressurised butane
   cannisters as a child?
  
  We *all* used to do *that* :-)
  
 
snip content="tales of madness and danger from the dark mccarroll
past"/
 
 So, should we start baiting Scientologists through the archive? 

aren't they no fun in that all they do is sent a cease and desist
letter rather than get involved in pointless debates? 

plus do we really want people coming round a seizing our computers as
evidence? (well, not unless it's covered by household insurance as
mine's looking a bit elderly these days)

struan



RE: archiving

2001-04-03 Thread dcross - David Cross

From: Greg McCarroll [EMAIL PROTECTED]
Sent: 03 April 2001 13:56

 So, should we start baiting Scientologists through the archive? 

Where do I start?

* L Ron Hubbard is on record as saying the best way to make money is to
start a religion. A few years later he founded the church of scientology.

* Scientologists believe that humans are descended from clams.

* Tom Cruise and Nicole Kidman were both scientologists. There's a rumour
that their (exactly) ten year marriage was a scientology contract drawn up
to cover up the fact that they're both gay.

* Scientologists pay huge sums of money to buy "secrets" that are mirrored
all over the internet. The "church" claims these are copyrighted and will do
their best to close down any site carrying these.

* The "church" was responsible for the closure of anon.penet.fi and recently
forced Slashdot to edit some comments.

* Loads more good stuff from Operation Clambake at http://www.xenu.net.

Is that the sort of thing you wanted?

Dave...

-- 


The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged. If the reader 
of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  
If you have received this communication in error, please 
re-send this communication to the sender and delete the 
original message or any copy of it from your computer
system.



Re: archiving

2001-04-03 Thread Struan Donald

* at 03/04 14:17 +0100 dcross - David Cross said:
 From: Greg McCarroll [EMAIL PROTECTED]
 Sent: 03 April 2001 13:56
 
  So, should we start baiting Scientologists through the archive? 
 
 Where do I start?
 
 * L Ron Hubbard is on record as saying the best way to make money is to
 start a religion. A few years later he founded the church of scientology.
 
 * Scientologists believe that humans are descended from clams.
 
 * Tom Cruise and Nicole Kidman were both scientologists. There's a rumour
 that their (exactly) ten year marriage was a scientology contract drawn up
 to cover up the fact that they're both gay.
 
 * Scientologists pay huge sums of money to buy "secrets" that are mirrored
 all over the internet. The "church" claims these are copyrighted and will do
 their best to close down any site carrying these.
 
 * The "church" was responsible for the closure of anon.penet.fi and recently
 forced Slashdot to edit some comments.
 
 * Loads more good stuff from Operation Clambake at http://www.xenu.net.
 
 Is that the sort of thing you wanted?

you'll have those illumnati round your house this evening.. or is that
david ike?

struan

and you forgot the machines for exorcising the space aliens from your
head. or something like that.



More Scientology stuff, ignore if you are not interested was Re: archiving

2001-04-03 Thread Greg McCarroll

* dcross - David Cross ([EMAIL PROTECTED]) wrote:
 From: Greg McCarroll [EMAIL PROTECTED]
 Sent: 03 April 2001 13:56
 
  So, should we start baiting Scientologists through the archive? 
 
 Where do I start?
 
 * L Ron Hubbard is on record as saying the best way to make money is to
 start a religion. A few years later he founded the church of scientology.
 

as in CoS 

"People should be free to believe whatever they want, including Scientology. 
What I have against CoS is its deceitfulness, its lack of compassion for its 
members (especially the hard-working staff), its aggressive hard sell, its 
arrogance, its attack on free speech, its litigiousness, its harassment of 
its critics, its lack of concern for families, its gross neglect and abuse of 
children, etc. "

from http://www.xenu.net/cb-faq.html

you can also help out at http://www.xenu.net/support.html
 
 Is that the sort of thing you wanted?
 

exactly dave, it makes me feel that the archive have some use!

-- 
Greg McCarroll  http://www.mccarroll.uklinux.net



RE: archiving

2001-04-03 Thread Andy Williams

 On Tue, 3 Apr 2001, dcross - David Cross wrote:
  * Scientologists pay huge sums of money to buy "secrets" that are mirrored
  all over the internet. The "church" claims these are copyrighted and will do
  their best to close down any site carrying these.
  --
  The information contained in this communication is
   ^^
  confidential, is intended only for the use of the recipient
   
  named above, and may be legally privileged. If the reader
  of this message is not the intended recipient, you are
  ^^^
  hereby notified that any dissemination, distribution or
   ^^^
  copying of this communication is strictly prohibited.
   

 Is it just me that finds your disclaimer really quite funny in context? :)


Hey!!! That took the legal team at Acxiom (US) months to come upt with :)

Andy (Acxiom Employee :()






Re: Legal Disclaimers on Email (was: Re: archiving)

2001-04-03 Thread Andy Williams

On Tue, 3 Apr 2001, Dominic Mitchell wrote:

 On Tue, Apr 03, 2001 at 09:56:27AM -0400, Andy Williams wrote:
 [snip]
  Hey!!! That took the legal team at Acxiom (US) months to come upt with :)

 And what do they know about UK law?


Sweet FA I guess. I have pointed this out to our "management team", but
I'm just a lowly perl hacker, what would I know.

Andy




Re: archiving

2001-04-03 Thread Dean

On Tue, Apr 03, 2001 at 02:17:01PM +0100, dcross - David Cross wrote:
 
 So, should we start baiting Scientologists through the archive? 
 
 Where do I start?
Posting the fishman affidavit should do it. ;)

 * The "church" was responsible for the closure of anon.penet.fi and recently
 forced Slashdot to edit some comments.

Forced is a bit strong. They used the (Broken) DMCA law and told Slashdot
what to do. Slashdot realized that this wasn't every-ones favourite bad guy
Microsoft and realized that they had not a leg to stand on. The reason i
have such a jaded view of this is that the situation was very similar to
the Microsoft Kerberus one and Slashdot held their ground over that one.

Also it was amusing to see the comments praising the decision to back down
and remove the article.
 
Dean
-- 
Profanity is the one language all programmers understand
   --- Anon



Re: archiving

2001-04-03 Thread David H. Adler

 
 Did you all know that i used to blow up pressurised butane
 cannisters as a child?

No, but I'm hardly surprised...

-- 
David H. Adler - [EMAIL PROTECTED] - http://www.panix.com/~dha/
"i don't play lead.  it interferes with my drinking." - Malcolm Young



True Scientology Story (was Re: More Scientology stuff, ignore ifyou are not interested was Re: archiving)

2001-04-03 Thread Jonathan Stowe

On Tue, 3 Apr 2001, Greg McCarroll wrote:

 * dcross - David Cross ([EMAIL PROTECTED]) wrote:
  From: Greg McCarroll [EMAIL PROTECTED]
  Sent: 03 April 2001 13:56
 
   So, should we start baiting Scientologists through the archive?
 
  Where do I start?
 
  * L Ron Hubbard is on record as saying the best way to make money is to
  start a religion. A few years later he founded the church of scientology.
 

 as in CoS 

 "People should be free to believe whatever they want, including Scientology.
 What I have against CoS is its deceitfulness, its lack of compassion for its
 members (especially the hard-working staff), its aggressive hard sell, its
 arrogance, its attack on free speech, its litigiousness, its harassment of
 its critics, its lack of concern for families, its gross neglect and abuse of
 children, etc. "

 from http://www.xenu.net/cb-faq.html

 you can also help out at http://www.xenu.net/support.html
 
  Is that the sort of thing you wanted?
 

 exactly dave, it makes me feel that the archive have some use!


I have one Scientology story -

A couple of years ago I was in East Grinstead hospital (thing 'Guinea Pig
Club') while they were trying to fix the little finger on my right hand (
they failed but thats another story ).  There was this nice Maori guy in
the bed next to me out of his head on pain-killers as he had third degree
burns on his arms.  Anyhow it transpired that he was part of a Maori
dancing troupe that was doing some cultural tour at the behest of the
Church of Scientology whose european headquarters happen to be in East
Grinstead.  The second day I was in the hospital I was beginning to get a
little pissed off as you do and  this party of bloody Scientology Auditors
came along and started doing their thing with this geezer with only the
merest of hospital screens around - I dont think that they get out the old
baked bean can and avometer device ( Oooh sorry E-Meter ) but you can
never be too sure -  and this started going on for seeming hours and I was
that bored that I had started reading Bjarne Stroustrup' book again.

I'm not going to bore you with the details of wahat the prats were going o
about but needless to say it could be deduced from Hubbards earlier
writings and the basic milieu of cod spychology of the early sixties ...

I complained to the staff and they said it pissed them off too but they
got a lot of them in being the HQ and everything and they couldnt do much
about it 


/J\