regen_maillist-2.3.py
1 |
#!/usr/bin/env python
|
---|---|
2 |
# -*- coding: utf-8 -*-
|
3 |
#from scribe import backend
|
4 |
from scribe import eolegroup |
5 |
print
|
6 |
print "Vérification des listes de diffusion" |
7 |
print
|
8 |
grp = eolegroup.Group() |
9 |
for group in grp.get_groups(): |
10 |
liste = grp.get_maillist(group) |
11 |
if liste:
|
12 |
if "@i-" in liste: |
13 |
domaine = 'restreint'
|
14 |
else:
|
15 |
domaine = 'internet'
|
16 |
print "Liste du groupe %s..." % group |
17 |
typ = grp.get_attr(group, 'type')
|
18 |
grp.add_maillist(typ, group, domaine) |
19 |
print
|
20 |
print 'Vous pouvez lancez le script "regenalias.sh" pour corriger les alias du Smtp' |
21 |
print
|