dcox@ssd.kodak.com (Don Cox) (04/11/91)
System: Sun I am on numerous mailing lists in our organization and save all of the postings in appropriate mail folders. I would like to be able to mail a newcomer to a list all of the previous postings. I found out that you can't mail a mail folder: # mail newperson < mail_folder doesn't do anything. I can mail the mail folder as a huge file by: # cat mail_folder | mail newperson but I would rather the posting were sent as individual messages. (When I 'mail -f mail_folder', I can read the postings one at a time. I would like to be able to mail them in the same manner) Is such a thing possible? Does anyone know of any way to archive articles from a mail list so that all of the previous postings can be mailed to someone new to the list? Thanks much. -- Don Cox Phone (716) 253-7121 KMX (716) 253-7998 INTERNET dcox@ssd.kodak.com
oz@yunexus.yorku.ca (Ozan Yigit) (04/15/91)
dcox@ssd.kodak.com (Don Cox) writes: ># cat mail_folder | mail newperson >but I would rather the posting were sent as individual messages. There is a MailSplit program (circa 1986, by Russell Quin) that will will break up a mail file into individual files. I will send you a copy. I also include the man page for future reference. oz --- Not all good things come with three | internet: oz@nexus.yorku.ca pages of dogma and an attitude. - anon | uucp: utzoo/utai!yunexus!oz --- MAILSPLIT(1L) UNKNOWN SECTION OF THE MANUAL MAILSPLIT(1L) NAME mailsplit - split a file or mailbox into single items (smaller files) SYNOPSIS mailsplit [ -? ] [ -oformat ] [ -ppattern ] [ -n ] [ file... ] DESCRIPTION Mailsplit splits large files into smaller ones. The splits occur on lines that match a pattern , which defaults to ``^From '' so that the command mailsplit mbox will split a mail (1) format mail-box, putting each message in a differnt file. Options are: -? Print a summary of options. Any unknown option will also do this -p The following string is taken to be a pattern to be used to match input lines to determine points at which to split the input. See ed (1) for details of the pat- terns. The pattern may contain newlines (which match themselves). -o The folowing string is taken to be printf -style format to be used in the generation of output filenames. There should be a %d in the string, which will be used to insert a disambiguating number. This number is zero for the first file, and is incremented at the start of each output file. The -i option can be used to start the number with another value, however. The default format is split:%-06.d which results in files having names split:000000, split:000001, split:000002, and so on. Thus, mailsplit -o%d would produce files having the names 1, 2, 3, and so on. The default format was chosen because the result- ing files are listed in numerical order by ls (1), or by echo * which is sometimes useful. -in The number n will be used to number the first file; the number used each time will thereafter be incremented as normal. See the -p option for the use of this. -nn Split the input every n lines. In this case, no pattern matching is performed. This is the behaviour of split (1), except that mailsplit normally produced different filenames. DIAGNOSTICS Mostly straight-forward. ``Internal Error'' indicates a bug in mailsplit , and should be reported. Exit staus 1 indi- cates an error parsing options - for example, if an unknown flag was ued. Exit status 2 indicates a meaningless combi- nation was detected and rejected (this is rare in practice). Exit status 3 indicates a run-time problem - for example, if a file couldn't be opened. SEE ALSO ed (1), mail (1), ls (1), split (1), printf (3). Sun Release 3.5 Last change: Local 2
lee@sq.sq.com (Liam R. E. Quin) (04/17/91)
oz@yunexus.yorku.ca (Ozan Yigit) writes: > There is a MailSplit program (circa 1986, by Russell Quin) that > will will break up a mail file into individual files. Eeek! I wrote that before I changed my name to Liam! :-) (1984, I think) Note that mailers will convert "From_" lines to ">From" lines. You should do one of the following sed 's/^From '/###From /' folder | Mail remoteuser or, better, use shar. Some mailer links won't like files over 64K, and I suspect that others will die on 32767 bytes. But this is getting a little far away from alt.sys.sun now... Lee -- Liam Russell Quin, SoftQuad Inc., Toronto... 416 963 8337... lee@sq.com `All that is necessary in the production of a book is an author and a bookseller, with no intermediate parasite.' George Bernard Shaw, letter, 1895