Gente tambien encontre esto en la doc de sendmail voy a probar las dos
formas tuanis!!
Subject: Q4.21 -- How can I send mail to all users?
Date: December 12, 2000
There is no magic short-cut for this. But it is not hard to set up: create
an aliases entry
alluser: :include:/etc/mail/allusers
Don't forget to run 'newaliases'. Then list your users, one per line, in
the file '/etc/mail/allusers'. You might be able to do that with
awk -F: '$3 > 100 { print $1 }' /etc/passwd > /etc/mail/allusers
http://www.sendmail.org/faq/section4.html#4.21
> Una soluci�n puede ser:
>
> Este programa en perl recorreo el archivo /etc/passwd
> Igual puede ser cualquier otro archivo txt con los correos
> Manda a todo lo que este en ese archivo
> El archivo correo.txt tiene el formato del email, puede ser lo que quira
> text html .. pero tiene que darle formato
> Cambiar variables $from y $dominio
>
>
> ----- Inicio ----
>
> #!/usr/bin/perl
>
> ####################################
> #
# Autor: Gregory Cascante Aviles
> # Universidad Latina de Costa Rica
> ####################################
>
> my $smail = '/usr/lib/sendmail -t';
> $email_file = "/etc/passwd";
> $mensaje = "correo.txt";
> $sleep_count = 100; #Numeros de correo que manda antes de dormir
> $sleep_secons = 60; #Numero de Segundos que duerme
> $jump_to = 0;
>
> $from = "[EMAIL PROTECTED]";
> $dominio = "mydominio.com";
>
> print "Habrir el Archivo Que tiene el mensaje: $mensaje\n";
> open(MENSAJE,$mensaje) || die "\n No puedo ver el mensaje \n";
>
> #Meter el Mensaje en na variable
> @cuerpo = <MENSAJE>;
> @clean_cuerpo = @cuerpo;
> close (MENSAJE);
>
> #Abrir el buffer para mandar el archivo
> #print "Abrir el contador: $email_file.counter.txt\n";
> open(COUNTER,">>$email_file.counter.txt");
> #print "Abrir lista correos: $email_file\n";
> open(FILE_HANDLE,$email_file) || die "\n No puede habrir: $email_file
> \n"; $cont = 1 ;
> $sleep_count_temp = 0;
>
> while (<FILE_HANDLE>)
> {
> if ($jump_to <= $cont)
> {
> chomp;
> @lista = split/:/,$_;
> #print "Abrir archivo sendmail: $smail\n";
> # open (MAIL_to_greg, "|$smail") || die "\n No puede habrir $smail
> \n"; # print MAIL_to_greg "From: $from \n";
> # print MAIL_to_greg "To: [EMAIL PROTECTED]";
> # print MAIL_to_greg "Return-Path: <$from>\n";
> # print MAIL_to_greg "Subject: $subject\n";
>
> # print MAIL_to_greg @cuerpo;
> # close (MAIL_to_greg);
> print "Send: $cont --> [EMAIL PROTECTED]";
> print COUNTER "$cont\n";
> $cont++;
> $sleep_count_temp++;
> #Este sleep es entre correo y correo
> #sleep(1);
> if ($sleep_count_temp >= $sleep_count)
> {
> $sleep_count_temp = 0;
> print "\nDurmiendo por $sleep_secons segundos\n";
> print "\n";
> sleep($sleep_secons);
> }
> }
> else
> {
> chomp;
> @lista = split/,/,$_; #Con esto salto al siguiente registro
> #print "Skiped: $cont --> $lista[0]\n";
> $cont++;
> }
> } #End while
> close(COUNTER);
>
>
> ----- Original Message -----
> From: "Jonathan Chaves Avalos" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 07, 2003 5:24 PM
> Subject: pregunta sobre sendmail
>
>
>> Una dudilla que salio ahora que lo necesito.
>> Como hago con sendmail para enviar un correo a todos los usuario que
>> tienen cuenta en mi servidor?
>> Pura vida gente por toda la ayuda
>>
>>
>>
>> --
>> Desuscripci�n: escriba a [EMAIL PROTECTED], tema
> 'unsubscribe'
>> Problemas a: [EMAIL PROTECTED]
>> http://www.linux.or.cr/listas
>>
>
>
> --
> Desuscripci�n: escriba a [EMAIL PROTECTED], tema
> 'unsubscribe' Problemas a: [EMAIL PROTECTED]
> http://www.linux.or.cr/listas
--
Desuscripci�n: escriba a [EMAIL PROTECTED], tema 'unsubscribe'
Problemas a: [EMAIL PROTECTED] http://www.linux.or.cr/listas