Xref: utzoo comp.mail.sendmail:3039 alt.sys.sun:3509 Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!oz From: oz@yunexus.yorku.ca (Ozan Yigit) Newsgroups: comp.mail.sendmail,alt.sys.sun Subject: Re: mailing a mail folder Message-ID: <22413@yunexus.YorkU.CA> Date: 15 Apr 91 15:53:43 GMT References: <1991Apr11.014215.11231@ssd.kodak.com> Sender: news@yunexus.YorkU.CA Distribution: na Organization: York U. Communications Research & Development Lines: 128 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