[ILUG] {ILUG] Braudcast E-mail

Lars Hecking lhecking at nmrc.ucc.ie
Fri Nov 19 16:27:16 GMT 1999


Kieran O' Sullivan writes:
> how do I send a mail so that everyone who has an account gets it.
> Preferably without copying all user names into the To or CC fields of some
> mail program.

 For a one-off:

 $ for user in `ypcat passwd | cut -d: -f1` ; do /bin/mailx -s "Subject" $user < /path/to/message-in-file ; done

 (substitute what is appropriate for your system for "ypcat passwd ..."
  and /bin/mailx.)

 Else, set up a mailing list.





More information about the ILUG mailing list