Koozali.org: home of the SME Server

How to post one e-mail to all users on e-smith box

Chris Booyens

How to post one e-mail to all users on e-smith box
« on: December 13, 2000, 03:02:02 PM »
Hi There,

How can I as user or root send one e-mail to all users on my e-smith box.  

Thanks

Chris

alejandro

RE: How to post one e-mail to all users on e-smith
« Reply #1 on: December 13, 2000, 05:01:17 PM »
send a mail to "yourgroup@yourdomain.com"(net,org,etc)

Tim Litwiller

RE: How to post one e-mail to all users on e-smith
« Reply #2 on: December 13, 2000, 05:39:33 PM »
I other words, put everyone in a common group, maybe called everyone then you could send an email to everyone@yourdomain.com and all users on your server will get the email.

Gordon Rowell

RE: How to post one e-mail to all users on e-smith
« Reply #3 on: December 13, 2000, 06:08:07 PM »
Tim Litwiller wrote:

> I other words, put everyone in a common group, maybe called
> everyone then you could send an email to
> everyone@yourdomain.com and all users on your server will get
> the email.

FYI, all users are automatically in the group "shared"

There will be an pseudonym everyone == shared in 4.1 when it is
released.

In the meantime, create the file

~alias/.qmail-everyone

containing the single line "shared" (without the quotes).

Gordon

Pierluigi Miranda

RE: How to post one e-mail to all users on e-smith
« Reply #4 on: October 15, 2001, 01:33:20 PM »
I know I'm following a somewhat obsolete thread, hope you'll forgive me.

I'm trying to understand how to send a message to all my ESSG 4.0.1 users at once. I did a search on this topic, and found what follows:

>Gordon Rowell wrote:
>
> Tim Litwiller wrote:
>
>> I other words, put everyone in a common group, maybe called
>> everyone then you could send an email to
>> everyone@yourdomain.com and all users on your server will
>> get the email.
>
> FYI, all users are automatically in the group "shared"
>
> There will be an pseudonym everyone == shared in 4.1 when it
> is released.
>
> In the meantime, create the file
>
> ~alias/.qmail-everyone
>
> containing the single line "shared" (without the quotes).
>
> Gordon

So, *IF* I understand well, a qmail alias that points to "shared" should be enough. So I created the alias .qmail-tutti with the single line "shared" in it, without any other intervention, and tried to send a mail to tutti@agecontrol.it as bcc.

It didn't work: I received an error message from MAILER-DAEMON, stating that:

"Hi. This is the qmail-send program at agecontrol.it.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

:
Sorry, no mailbox here by that name. (#5.1.1)

--- Below this line is a copy of the message.
[...]"

It seems that qmail can't address a user group... on the other hand, I noticed that all other regular groups have a .qmail alias file that contains the group member list.

Am I missing something? Should I create a group that contains all the users of the system? Might be there's a config problem somewhere?

Many thanks

--

Pierluigi Miranda

Pierluigi Miranda

RE: How to post one e-mail to all users on e-smith
« Reply #5 on: October 16, 2001, 10:09:41 PM »
Due to the lack of feedback, I'll answer me by myself. :)

To whoever it may concern: with a [more than] little bit of cut'n'paste, I managed in writing an ESSG action that creates a .qmail alias "everyone". It's a "secret" alias, it doesn't shows on the LDAP directory - and this is the main reason I didn't want to create a group to hold all the users, because it would appear on the directory.

*THIS IS FOR ESSG 4.0.x ONLY! DO NOT USE THE FOLLOWING SCRIPT ON NEWER (or older?) MACHINES. IF YOU DO, IT IS AT YOUR RISK!!!*

Here is the procedure: it contains the instructions to manually install it. I am pretty sure that the lines will be breaked: if you are not sure you can reformat them correctly, feel free to ask me a copy and I'll send it to you as an attachment.

Feel free to make any comment you may see fit - even about the "license" terms, as it's my first try at it and I don't want do any "gaffe", particularly against E-Smith/Mitel staff.

---------- 8< ----------
#!/usr/bin/perl -w

#----------------------------------------------------------------------
# copyright (C) 2001 Pierluigi Miranda
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#
#----------------------------------------------------------------------

#----------------------------------------------------------------------
# create-everyone-alias 0.1
#
# E-Smith 4.0.x action that creates a qmail alias "everyone" associated to
# all the users of the system.
#
# CAUTION
# *DO NOT* install this script on ESSG 4.1.x or higher. On these systems,
# the functionality provided by this script is already supported.
# this script should be installed on ESSG
#
# Installation instructions:
# from root account, issue the following commands:
# install -o root -g root -m 555 create-everyone-alias /etc/e-smith/events/actions
# ln -s /etc/e-smith/events/actions/create-everyone-alias /etc/e-smith/events/user-create/S99create-everyone-alias
# ln -s /etc/e-smith/events/actions/create-everyone-alias /etc/e-smith/events/user-delete/S99create-everyone-alias
#----------------------------------------------------------------------

package esmith;

use strict;
use Errno;
use esmith::config;
use esmith::util;

my %accounts;
tie %accounts, 'esmith::config', '/home/e-smith/accounts';

open (WR, ">/var/qmail/alias/.qmail-everyone")
    || die "Cannot open output file /var/qmail/alias/.qmail-everyone: $!\n";
esmith::util::chownFile ("alias", "qmail", "/var/qmail/alias/.qmail-everyone");

my $key;
my $value;

while (($key,$value) = each %accounts)
{
    my ($type, %properties) = split (/\|/, $value, -1);
    if ($type eq 'user')
    {
        print WR "&$key\n";
    }
}
close WR;

exit 0
---------- 8< ----------

--

Pierluigi Miranda

sidney

RE: How to post one e-mail to all users on e-smith
« Reply #6 on: October 17, 2001, 05:25:21 PM »
Hello,

   Is there away to setup a email group "Distribution List"
on SME v5?



Thanks