Xref: utzoo comp.unix.questions:31239 comp.unix.shell:2156 comp.unix.wizards:25552 comp.unix.programmer:1806 comp.mail.elm:4107 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!linac!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.unix.questions,comp.unix.shell,comp.unix.wizards,comp.unix.programmer,comp.mail.elm Subject: Re: UNIX SHELL PROG. & ELM QUESTIONS Message-ID: <1991May12.022641.18961@mp.cs.niu.edu> Date: 12 May 91 02:26:41 GMT References: <1991May10.064610.25802@starnet.uucp> Organization: Northern Illinois University Lines: 37 In article <1991May10.064610.25802@starnet.uucp> moe@starnet.uucp (Moe S.) writes: >1. If I have a large (500+ messages) in a mailbox-format file, > what is the best way to mail a file to everyone of the 500+? > (using elm or any other way). 500 is probably stretching the capabilities of much software. Most mailers pass the message to the transport (MTA) as arguments, and 500 may exceed the max allowed. If you are running sendmail as an MTA, the easiest way may be to extract the 'From:' lines and make each into a 'Bcc:' line for the new message which you then feed into 'sendmail' with the '-t' option (which implies that the recipient addresses come from 'To:' 'Cc:' and 'Bcc:' headers.) You message can also include a 'To:' with a group name - 'To: multiple_recipients:;' to make sure an 'Apparently-To:' in not generated. >2. If I have a file containing some names and email addresses such as > this: > xyz@jkjk.jkyu.reyui (John J. Doe) > Mark L. Lost > Joe!!! jjj@jhdf.434r.er > How can I re-organize the file (using awk, sed, etc...) so that > the email addresses are the first field in every line in the file? Very difficult. Probably beyond the abilities it awk, sed, etc. If Larry Wall happens to be reading this he may suggest perl. The trouble is that the syntax of RFC822 addresses is quite complex, and as X.400 gateways become more common the extreme cases of RFC822 addresses are increasingly likely to show up. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940