Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to write a shell script using a here document that will send a personalized greeting email to each student on a mailing list. I am using following script to sent mail to individual users:

$ cat >
mail $1 << endoftext
Dear $1
Welcome to the Unix Class
endof text

I am new to Unix so am not able to create mailing list.

Any help is really appreciated.

share|improve this question

closed as not a real question by womble, sysadmin1138 Jul 17 '11 at 14:38

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

...although this sounds like homework. – David Mackintosh Jul 15 '11 at 17:41
@David it reeks of homework :-) – voretaq7 Jul 15 '11 at 18:06
It smells like stack overflow homework, too... – womble Jul 15 '11 at 22:56

Method 1: Create an alias in your mail system's alias file (/etc/aliases or /etc/mail/aliases is usually the right spot), and use it do direct email to the addresses that should be on your list. Manage by editing (and recompiling) the aliases list / database. Refer to the man page for the aliases file and your MTA documentation for additional information.

Method 2: Install some mailing list software.
Manage in accordance with the documentation provided.

Note that you will need root access in order to implement either of these solutions, however implementing (2) typically allows non-root users to be mailing list managers, and is a much preferred solution.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.