UNIX SHELL PROG. & ELM QUESTIONS

Neil Rickert rickert at mp.cs.niu.edu
Sun May 12 12:26:41 AEST 1991


In article <1991May10.064610.25802 at starnet.uucp> moe at 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 at jkjk.jkyu.reyui (John J. Doe)
>	      Mark L. Lost <apple!mark at eee.dfsjk.jkj>
>	      Joe!!! jjj at 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               <rickert at cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940



More information about the Comp.unix.wizards mailing list