[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] mass mail server



Hi guys

In the past, i seen a few questions, asking if it was possible to email
every client on your server, heres how you can do it

Works great for me, its alot easier now emailing my clients to notify them
of services updates and server news....

Regards
Gary

-----------------

cat /etc/passwd | awk -F : '{ printf("/usr/sbin/sendmail %s <
message.txt\n", $1)}' > massmail.sh

then add a #!/bin/sh to the top of massmail.sh, and chmod +x it.  You'll
also want to remove mailing accounts like root, lp(r), nobody, etc.

Create message.txt in the same directory as massmail.sh

message.txt should contain a suitably formatted message.  Something
like:

From: Admin
Subject: whatever

Message Text

To run script, just type in /path/massmail.sh

I ran it as admin and it worked fine, if not, then su to root and then it
should work, the 1st time it worked a charm, then the next time, i forgot to
add the #!/bin/sh and chmod it...you will have to run it everytime you want
to send a message, in case your clients added a extra email account or
something...