Split mailbox into individual mails

  • Follow


Is there such a tool for Solaris that can take an /var/mail/ [mbox]
and split the mbox  into the individual emails ?
Thanks,
Carl
0
Reply cnurb 1/26/2011 5:43:14 PM

On Jan 26, 12:43=A0pm, cnurb <cnu...@yahoo.com> wrote:
> Is there such a tool for Solaris that can take an /var/mail/ [mbox]
> and split the mbox =A0into the individual emails ?
> Thanks,
> Carl


Found a perl script  at:

http://www.softpanorama.org/Scripting/Perlorama/perl_in_command_line.shtml

Output to Multiple Files

To split output among multiple files, change where standard output
points at based on some test. For example, the following will split a
standard unix mailbox file inbox into multiple files named out.*,
incrementing a number for each message in the mailbox.

 $ perl -pe 'BEGIN { $n=3D1 } open STDOUT, ">out.$n" and $n++ if /
^From /' inbox
0
Reply cnurb 1/26/2011 5:58:25 PM


In article <991fbde5-1dde-4fe3-add7-e7ac7dbe9374@r40g2000prh.googlegroups.com>,
cnurb  <cnurbw@yahoo.com> wrote:
>Is there such a tool for Solaris that can take an /var/mail/ [mbox]
>and split the mbox  into the individual emails ?
>Thanks,
>Carl

The MH/NMH "inc" command can do that.

	inc -file /var/mail/whatever -notruncate

Looks like sunfreeware.com has a prebuilt nmh available.


			Ted




			Ted
-- 
------
columbiaclosings.com
What's not in Columbia anymore..
0
Reply ted 1/26/2011 6:04:43 PM

cnurb <cnurbw@yahoo.com> asked:
> Is there such a tool for Solaris that can take an /var/mail/ [mbox]
> and split the mbox  into the individual emails ?

Perhaps "formail -s"  with suitable other arguments?
 -WBE
0
Reply wbe 1/26/2011 6:06:30 PM

3 Replies
737 Views

(page loaded in 0.049 seconds)

Similiar Articles:













7/24/2012 1:16:32 AM


Reply: