🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #16630

Re: problema envio correo

#16630
From: J.A. Gutierrez
Date: Tue, 04 Apr 2000 00:00
63 lines
2228 bytes
Esteban <scandisk@ctv.es> wrote:

: Para enviar el correo de mi enooooooorme libreta de direcciones, cuanto tengo
: que comunicar las actualizaciones de mi p�gina tengo un script tal:

: #!/bin/sh
: for i in `cat /home/scandisk/Mail/visitas`;
: do
: mail -s "Actualizaci�n P�gina" $i < /home/scandisk/bin/comunicado.txt ;
: done

	no es muy eficiente, que digamos.
	Te sugeriria (aparte de la posibilidad de hacer aliases
	del sendmail) algo similar a lo siguiente:


--8<-----bulk-mail.sh------------------------------------------------------
#!/bin/sh


if [ -f /usr/ucb/echo ]
then
	ECHO="/usr/ucb/echo -n"
else
	ECHO="/bin/echo -n"
fi

DOMAIN=cps.unizar.es
NAME=`egrep "^$LOGNAME:" /etc/passwd | nawk -F: '{print $5}'`
NAME=`echo "$NAME" | sed -e 's/,.*//'`
FROM="$NAME <$LOGNAME@`hostname`.$DOMAIN>"

(
    
cat <<- ++
From: $FROM
To: $FROM
Subject: Probando BCC
Precedence: bulk
++

$ECHO  "Bcc: "

while read addr
do
	$ECHO "$addr,"
done < addr.txt

echo $LOGNAME

cat mesg.txt


echo "-- "
cat $HOME/.signature

) | /usr/lib/sendmail -itv
---------------------------------------------------------------------------
-- 
PGP and other useless info at      \                 Oh, show us the way
http://www.cps.unizar.es/~spd/      \             to the next whisky bar
finger://daphne.cps.unizar.es/spd    \                      Weill/Bretch
es doloroso ser sabio y descubrir la sopa de ajo                   (Pla)
Technical Details
Message-ID: <8cclf8$3p2$1@news.unizar.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8ehsd6.3ai.scandisk@localhost.localdomain>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,f5fca631a94df716
X-Google-Attributes: gidf86c8,public
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Subject: Re: problema envio correo
Date: 2000/04/04
Message-ID: <8cclf8$3p2$1@news.unizar.es>
X-Deja-AN: 606517009
Content-Transfer-Encoding: 8bit
References: <slrn8ehsd6.3ai.scandisk@localhost.localdomain>
Content-Type: text/plain; charset=ISO-8859-1
X-Complaints-To: usenet@news.unizar.es
X-Trace: news.unizar.es 954849576 3874 155.210.152.20 (4 Apr 2000 11:59:36 GMT)
Organization: Rank
Mime-Version: 1.0
User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (IRIX/6.2 (IP22))
NNTP-Posting-Date: 4 Apr 2000 11:59:36 GMT
Newsgroups: es.comp.os.linux.programacion