1
|
#!/bin/bash
|
2
|
|
3
|
####################################
|
4
|
# Programme permettant de reg?n?rer
|
5
|
# les alias exim pour les listes
|
6
|
# de diffusion sympa
|
7
|
####################################
|
8
|
|
9
|
[ -x /usr/share/eole/FonctionsEoleNg ] || {
|
10
|
echo "Pas de bibliotheque Eole !"
|
11
|
exit 1
|
12
|
}
|
13
|
. ParseDico
|
14
|
. /etc/eole/containers.conf
|
15
|
|
16
|
etab=$domaine_messagerie_etab
|
17
|
fich="$container_path_mail/etc/mail/sympa.aliases"
|
18
|
|
19
|
CreoleService exim4 stop
|
20
|
|
21
|
echo "sympa: \"|/usr/lib/sympa/bin/queue sympa\"" > $fich
|
22
|
|
23
|
# g?n?ration des listes externes
|
24
|
for j in `ls /var/lib/sympa/expl | grep -v i-$etab`
|
25
|
do
|
26
|
echo "$j: \"|/usr/lib/sympa/bin/queue $j@$etab\"" >> $fich
|
27
|
echo "$j-request: \"|/usr/lib/sympa/bin/queue $j-request@$etab\"" >> $fich
|
28
|
echo "$j-editor: \"|/usr/lib/sympa/bin/queue $j-editor@$etab\"" >> $fich
|
29
|
echo "$j-owner: \"|/usr/lib/sympa/bin/bouncequeue $j@$etab\"" >> $fich
|
30
|
done
|
31
|
|
32
|
# g?n?ration des listes internes
|
33
|
for j in `ls /var/lib/sympa/expl/i-$etab`
|
34
|
do
|
35
|
echo "$j: \"|/usr/lib/sympa/bin/queue $j@i-$etab\"" >> $fich
|
36
|
echo "$j-request: \"|/usr/lib/sympa/bin/queue $j-request@i-$etab\"" >> $fich
|
37
|
echo "$j-editor: \"|/usr/lib/sympa/bin/queue $j-editor@i-$etab\"" >> $fich
|
38
|
echo "$j-owner: \"|/usr/lib/sympa/bin/bouncequeue $j@i-$etab\"" >> $fich
|
39
|
done
|
40
|
CreoleService exim4 start
|
41
|
|
42
|
# on force la reg?n?ration des inscrits
|
43
|
rm -f $container_path_mail/var/lib/sympa/expl/*/subscribers.db
|
44
|
rm -f $container_path_mail/var/lib/sympa/expl/*/*/subscribers.db
|
45
|
|