LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mailing List (https://www.linuxquestions.org/questions/linux-newbie-8/mailing-list-810190/)

esibilike 05-26-2010 06:02 AM

Mailing List
 
I am new to Linux and we want to broadcast an email to every member of our institution.
Currently we have more than 150 email addresses and 2 email lists.
the mail server is running on Redhat version 5, x86_64/i386

bathory 05-26-2010 07:47 AM

Hi,

What mail server you're running? Sendmail, postfix, other?
For sendmail that comes with RHEL, take a look at this

Regards

w1k0 05-26-2010 07:18 PM

I use such script:

mailing
Code:

#!/bin/bash

# "first@,second@" -- one e-mail to all (without spaces)
# "first@, second@" -- each e-mail separately (with spaces)
ADDRESSES="ADDRESSES.TXT"
MAIL="MAIL.TXT"
SIGNATURE="~/.signature"

SUBJECT="This isn't spam 3"

# "first -a second -a third" -- a few attachments
ATTACHMENT=""

REPLY="me@my.own.org"

cat $MAIL > /tmp/mail
cat $SIGNATURE >> /tmp/mail

for address in `cat $ADDRESSES`
do
    if [ "$ATTACHMENT" != "" ]
    then
        nail -s "$SUBJECT" -a $ATTACHMENT -r $REPLY $address < /tmp/mail
    else
        nail -s "$SUBJECT" -r $REPLY $address < /tmp/mail
    fi
done

rm /tmp/mail

To use it you have to prepare ADDRESSES.TXT, MAIL.TXT, and ~/.signature files as well as fullfill SUBJECT, ATTACHMENT, and REPLY variables.


All times are GMT -5. The time now is 04:16 AM.