Some work about #48. This is far from finished.

This commit is contained in:
tonio
2010-05-02 22:15:06 +02:00
parent 790fb45372
commit af8c33e659
8 changed files with 66 additions and 0 deletions
+19
View File
@@ -24,3 +24,22 @@ def loadmenus():
continue
result += (u,)
return result
def list_extensions():
basedir = "extensions"
result = []
for d in os.listdir(basedir):
if not os.path.isdir("%s/%s" % (basedir, d)):
continue
isvalid = True
for f in ['urls.py', 'main.py', '__init__.py']:
if not os.path.exists("%s/%s/%s" % (basedir, d, f)):
isvalid = False
break
if isvalid:
module = __import__(d, globals(), locals(), ['main'])
try:
result += [module.main.infos()]
except AttributeError:
pass
return result
+7
View File
@@ -24,6 +24,13 @@ from templatetags.amextras import *
from mailng.lib.email_listing import parse_search_parameters
from sql_listing import *
def infos():
return {
"name" : "Amavis quarantine",
"version" : "1.0",
"description" : _("Simple amavis quarantine management tool")
}
def init():
events.register("UserMenuDisplay", menu)
parameters.register("amavis_quarantine", "MAX_MESSAGES_AGE", "int", 14,
+7
View File
@@ -25,6 +25,13 @@ graph_list = [{"name" : "traffic", "label" : _("Average normal traffic")},
{"name" : "badtraffic", "label" : _("Average bad traffic")},
{"name" : "size", "label" : _("Average normal traffic size")}]
def infos():
return {
"name" : "Statistics",
"version" : "1.0",
"description" : _("Graphical statistics about emails traffic using RRDtool")
}
def init():
events.register("AdminMenuDisplay", menu)
parameters.register("stats", "LOGFILE", "string", "/var/log/mail.log",
+7
View File
@@ -34,6 +34,13 @@ def init():
parameters.register("webmail", "SMTP_SECURED", "list_yesno", "no",
help=_("Use a secured connection to access SMTP server"))
def infos():
return {
"name" : "Webmail",
"version" : "1.0",
"description" : _("Simple IMAP webmail")
}
def urls():
return (r'^mailng/webmail/',
include('mailng.extensions.webmail.urls'))