blob: 73dcee08cb7a7f4a70a0cf6e1df040b28c9ff9bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/python3
import os
import sys
from mailman.core.initialize import initialize
from mailman.config import config
from mailman.interfaces.pending import IPendings
from mailman.interfaces.requests import IListRequests, RequestType
from zope.component import getUtility
def clean_pended():
getUtility(IPendings).evict()
if __name__ == '__main__':
if os.getuid() == 0:
print("This script must be run as the mailman user", file=sys.stderr)
sys.exit(1)
initialize(config_path="/etc/mailman.cfg")
clean_pended()
config.db.commit()
|