Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: E-mail header info strip-off

From: petr:krenzelok:trz:cz at: 10-Jun-2001 13:23

----- Original Message ----- From: "Ingo Hohmann" <[ingo--2b1--de]> To: <[rebol-list--rebol--com]> Sent: Sunday, June 10, 2001 9:40 AM Subject: [REBOL] Re: E-mail header info strip-off
> Hi Geza, > > this here's a little mbox file parser I started hacking lately, > all you'll have left to do is send the email to your personalized > 'import-email ;-)
I am just curious - has anyone investigated NS mail format file + indexes? What do I really like about NS (and that's exactly the reason I still use NS) is - it's mail and news app. I like text form storage, as opposed to binary one of Outlook Express. Parsing NS mail inbox is not a problem, but the problem is - if it is possible and easy to use NS index files. If so, we could easily build NS mailer replacement, while still allowing to share the same mailbox between REBOL/View app, and NS itself ... -pekr-
> > I hope that helps a little ... > > REBOL [ > Title: "MBox Handling" > Date: 2001-07-05 > Author: "Ingo Hohmann" > Email: [ingo--2b1--de] > File: %mbox.r > Home: http://www.h-o-h.org/ > Version: 0.0.1 > ] > > mbox: context [ > ;file: %/home/ingo/Mail/test.mbox > chars: charset [ #"a" - #"z" #"A" - #"Z" ] > email-chars: charset [ #"a" - #"z" #"A" - #"Z" #"0" - #"9" #"." #"-"
#"_" #"+" #"%" ]
> digit: charset [ #"0" - #"9"] > mail-index: copy [] > > index: func [ > "creates an index of an mbox file" > mbox-file [file!] "mbox file to parse" > /local idx cnt blk > ] [ > either block? blk: select mail-index mbox-file [ > clear blk > ] [ > append mail-index mbox-file > append/only mail-index blk: make block! 100 > ] > save-index: func [][] > idx: make block! 500 > cnt: 0 > email-start: none > mbox-rule: [some email-rule to end email-end:] > address-rule: [ some email-chars "@" some email-chars ] ; could be
_much_ better ...
> email-rule: [ > email-end: ;(if not none? email-start [print [ ">" copy/part
email-start find email-start newline]])
> "From " copy frm address-rule " " 3 chars " " 3 chars " " 2 digit "
2 digit :" 2 digit ":" 2 digit " " 4 digit newline ;(?? frm)