dcox@ssd.kodak.com (Don Cox) (04/14/91)
System: Sun, SunOS4.1.1 Thanks for the replies on how to mail a mail folder. Now if I may go one step further, below is a couple of the entries in one of my mail folders (News.software.nntp), which has over 50 articles saved to it: From ... Article: 30 of news.software.nntp Newsgroups: news.software.nntp Subject: Re: How much of a load is nntp? [parts of header deleted] Date: Fri, 16 Nov 90 22:00:48 GMT [text deleted] From ... Article: 32 of news.software.nntp Newsgroups: news.software.nntp Subject: Re: How much of a load is nntp? [parts of header deleted] Date: Sat, 17 Nov 90 05:45:12 GMT [text deleted] . . . about 50 more articles follows ... 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? If I search for a 'From', it doesn't always occur at the beginning of a new posting. Any help is appreciated. Thanks. -- Don Cox Phone (716) 253-7121 KMX (716) 253-7998 INTERNET dcox@ssd.kodak.com
jik@athena.mit.edu (Jonathan I. Kamens) (04/15/91)
(Note Followup-To.) In article <1991Apr14.125148.27323@ssd.kodak.com>, dcox@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710