I'm using postfix and here's what I'm using. This
works by sending mail to [EMAIL PROTECTED] Can be
used for sending to all users or a group of users.
In /etc/postfix/aliases, I have the entry:
_All: "|/etc/postfix/mail2group 100"
where 100 us the groupid for "users" of which all my
email accounts are member of.
Here's the mail2group script:
#!/usr/bin/perl
$ENV{"PATH"}="/bin:/usr/bin:/sbin:/usr/sbin";
$group = $ARGV[0] + 0;
open(IN, "< /etc/passwd") || die "can't open
/etc/passwd";
while (<IN>)
{
chomp;
@usr = split(/:/, $_);
if ( $usr[3] == $group )
{
push(@ppl, $usr[0]);
}
}
close(IN);
open(IN, "< /etc/group") || die "can't open
/etc/group";
while (<IN>)
{
chomp;
@grp = split(/:/, $_);
if ( $grp[2] == $group )
{
push(@ppl, split(/, */, $grp[3]));
}
}
close(IN);
exit if ( $#ppl <= 0);
open(MAIL, "| /usr/sbin/sendmail " . join(" ", @ppl))
|| die "can't run sendmail";
while (<STDIN>)
{
print MAIL $_;
}
close(MAIL);
--- Leo Angelo Cordero <[EMAIL PROTECTED]>
wrote:
> i suggest that you create a mailing-list (e.g.
> [EMAIL PROTECTED]). medyo
> matrabaho lng pag-input ng lahat ng clients..
>
>
>
> On 8/17/06, tikz chat <[EMAIL PROTECTED]> wrote:
> >
> > you can just create a script calling all the email
> users and inserting the
> > mail content to it. :P
> >
> >
> >
> > On 7/19/06, John Homer Alvero <
> [EMAIL PROTECTED]> wrote:
> > >
> > > If you want you to send personalized mails, say
> you want to include
> > > data based on
> > > values from a database table per email (think
> tokens), you may want to
> > > brew a
> > > perl script to do this. I did mine using
> Mail::QmailQueue.
> > >
> > > john
> > >
> > >
> > >
> > > On 7/19/06, seekuel < [EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > hello,
> > > >
> > > > What if you'll make those clients a member of
> your domain's mailing
> > > lists. :)
> > > >
> > > >
> > > >
> > > > On 7/19/06, [EMAIL PROTECTED]@cus < [EMAIL PROTECTED]>
> wrote:
> > > >
> > > > >
> > > >
> > > >
> > > > Hi guys,
> > > > what is the best way to do this? Send an email
> to all my clients, let
> > > say informing some scheduled maintenance on the
> server. I though of using
> > > the alias file. Is there any other good ways to
> do it? Im using postfix.
> > > >
> > > > thanks.
> > > >
> > > >
> > > >
> > > > ________________________________
> > > Talk is cheap. Use Yahoo! Messenger to make
> PC-to-Phone calls. Great
> > > rates starting at 1ยข/min.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> _________________________________________________
> > > > Philippine Linux Users' Group (PLUG) Mailing
> List
> > > > [email protected] (#PLUG @
> irc.free.net.ph)
> > > > Read the Guidelines:
> http://linux.org.ph/lists
> > > > Searchable Archives:
> http://archives.free.net.ph
> > > >
> > > >
> > > >
> > > >
> _________________________________________________
> > > > Philippine Linux Users' Group (PLUG) Mailing
> List
> > > > [email protected] (#PLUG @
> irc.free.net.ph)
> > > > Read the Guidelines: http://linux.org.ph/lists
> > > > Searchable Archives:
> http://archives.free.net.ph
> > > >
> > > >
> > >
> _________________________________________________
> > > Philippine Linux Users' Group (PLUG) Mailing
> List
> > > [email protected] (#PLUG @
> irc.free.net.ph)
> > > Read the Guidelines: http://linux.org.ph/lists
> > > Searchable Archives: http://archives.free.net.ph
> > >
> >
> >
> > _________________________________________________
> > Philippine Linux Users' Group (PLUG) Mailing List
> > [email protected] (#PLUG @ irc.free.net.ph)
> > Read the Guidelines: http://linux.org.ph/lists
> > Searchable Archives: http://archives.free.net.ph
> >
> >
> > _________________________________________________
> Philippine Linux Users' Group (PLUG) Mailing List
> [email protected] (#PLUG @ irc.free.net.ph)
> Read the Guidelines: http://linux.org.ph/lists
> Searchable Archives: http://archives.free.net.ph
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph