Steve Shipway
2014-10-21 22:21:33 UTC
Sometimes, I need to email all list owners on our list server, such as to
inform them of a scheduled outage or new features.
To do this, I've set up a Sympa mailing list that uses a SQL external
datasource to define its membership as being all list owners; I have then
used the exclude list to exclude myself from it.
Here's how to set up the external datasource:
include_sql_query
name list_owners
db_name sympa
passwd XXXXXX
db_type mysql
user sympa
sql_query SELECT DISTINCT `user_admin` FROM `admin_table` WHERE `role_admin`
= 'owner' order by `user_admin`
db_port 3306
host localhost
The passwd setting is the db_passwd from your sympa.conf; db_user, db_type,
db_host and db_name are also in there though I've used the default values
here as most people will have done.
You may also want to add "AND `reception_admin` = 'mail' " to the sql_query,
in case you want to exclude admins with nomail set.
sql_query SELECT DISTINCT `user_admin` FROM `admin_table` WHERE `role_admin`
= 'owner' AND `reception_admin` = 'mail' order by `user_admin`
This external datasource now means I have a list that will reliably email
all list owners at any particular time. I've also set mailmerge on the
list, and have a custom attribute to hold the list of listnames for which
they are owner; however to keep that in synch I've had to resort to an
external script that I run nightly. It does, however, let me email people
using mailmerge to give them the list of lists for which they are owner, in
case they have forgotten.
Hope someone finds this useful. comments and feedback welcome.
Steve
Steve Shipway
University of Auckland
UNIX Systems Design Team Lead
s.shipway-1/***@public.gmane.org
+64 (9) 3737 599 ext 86487
inform them of a scheduled outage or new features.
To do this, I've set up a Sympa mailing list that uses a SQL external
datasource to define its membership as being all list owners; I have then
used the exclude list to exclude myself from it.
Here's how to set up the external datasource:
include_sql_query
name list_owners
db_name sympa
passwd XXXXXX
db_type mysql
user sympa
sql_query SELECT DISTINCT `user_admin` FROM `admin_table` WHERE `role_admin`
= 'owner' order by `user_admin`
db_port 3306
host localhost
The passwd setting is the db_passwd from your sympa.conf; db_user, db_type,
db_host and db_name are also in there though I've used the default values
here as most people will have done.
You may also want to add "AND `reception_admin` = 'mail' " to the sql_query,
in case you want to exclude admins with nomail set.
sql_query SELECT DISTINCT `user_admin` FROM `admin_table` WHERE `role_admin`
= 'owner' AND `reception_admin` = 'mail' order by `user_admin`
This external datasource now means I have a list that will reliably email
all list owners at any particular time. I've also set mailmerge on the
list, and have a custom attribute to hold the list of listnames for which
they are owner; however to keep that in synch I've had to resort to an
external script that I run nightly. It does, however, let me email people
using mailmerge to give them the list of lists for which they are owner, in
case they have forgotten.
Hope someone finds this useful. comments and feedback welcome.
Steve
Steve Shipway
University of Auckland
UNIX Systems Design Team Lead
s.shipway-1/***@public.gmane.org
+64 (9) 3737 599 ext 86487