mailing mail folders

Jonathan I. Kamens jik at athena.mit.edu
Mon Apr 15 10:48:57 AEST 1991


  (Note Followup-To.)

In article <1991Apr14.125148.27323 at ssd.kodak.com>, dcox at ssd.kodak.com (Don Cox) writes:
|> Does anyone know of a script that I can pipe into /usr/ucb/Mail that
|> will mail 50 seperate articles to the recipient, rather then having to
|> send it as one huge mail article?

  My first response is "learn perl," since I think perl will make easiest what
you're trying to do.  However, you might also be able to use a program
(recently posted in alt.sources, I believe; see the alt.sources archives, or
my READ THIS FIRST posting in comp.sources.wanted if you don't know how to
get to the alt.sources archives) that splits a file up based on an arbitrary
line prefix (you could split on "From " to split your mail file into separate
messages).

|> If I search for a 'From', it doesn't always occur at the beginning
|> of a new posting. 

  However, when it appears at the beginning of a line, then it should always
occur at the beginning of a new posting, so you can search for "From " at the
beginning of a line.

  In other words, any program that saves postings into a file in Unix mail
format should be smart enough to notice when "From " appears at the beginning
of a line in the middle of a posting, and when it does, should prefix that
line with ">".

  If that doesn't work, then I'm curious to know which software you're using
to save postings into a file.

  A way to get around the problem is to search for "From " at the beginning of
a line preceded by two blank lines, but that won't solve the problem, just
make it less severe, since a posting which contains that pattern will get
split incorrectly.  The real solution is to fix whatever software you are
using so it detects "From " and prefixes it.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.wizards mailing list