OT: sed script help, please

Alexander Lazarević Alexander at lazarevic.de
Tue Sep 20 03:18:10 UTC 2005


Hi Tim!

Is mbox format the same as mailbox format? Then I guess you could use
formail for the job (comes with procmail).

"     formail is a filter that can be  used  to  force  mail  into
     mailbox  format,  perform  `From  ' escaping, generate auto-
     replying headers, do  simple  header  munging/extracting  or
     split    up    a    mailbox/digest/articles    file.     The
     mail/mailbox/article contents will be expected on stdin."

Alex

[1]
http://www.cebitec.uni-bielefeld.de/cgi-bin/man.cgi?section=1&topic=formail

Tim Rowledge schrieb:
> I need a sed script (to run on OS/X Tiger) that will take an exported
> email file and convert it to a variant of mbox format that OS/X Mail
> will import.
> 
> I didn't know until I tried just how many variations and nit-picky
> hassles there could be for this apparently simple action - export email
> in 'From' format (ie mbox) and import to Mail. Sheesh. What fun.
> 
> So far as I can discern I need to export as rmail format in order to
> get an easily searchable message delimiter; the mbox esport seems to
> not get it quite right. Did I say 'what fun' already?
> 
> Once I have an rmail file it seems to work if I convert the
> #!rmail 0000000
> lines to
>>From foo {some date sort of stuff}
> since everything after the From is ignored except that it has to be
> there or the whole message or even file is ignored!
> 
> OS/X has sed sitting there and that seems like a sensible tool for
> converting several umpty-bytes of email rather than trying to use my
> text editor or even some Squeak script. Except that I don't know sed
> and I'll bet somebody out there does and could solve this in a small
> number of seconds.
> 
> Help most gratefully received.
> 
> tim
> --
> Tim Rowledge, tim at rowledge.org, http://www.rowledge.org/tim
> Useful random insult:- The perfect personality to write software
> manuals.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3192 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050920/01e51880/smime.bin


More information about the Squeak-dev mailing list