mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Documentation update + little bugfix
This commit is contained in:
@@ -335,14 +335,14 @@ Then, you need to specify where is the database that contains the
|
||||
quarantine. Inside settings.py, add a new connection to the
|
||||
DB_CONNECTIONS variable like this::
|
||||
|
||||
DB_CONNECTIONS = (
|
||||
{"amavis_quarantine" : {"driver" : "mysql",
|
||||
DB_CONNECTIONS = {
|
||||
"amavis_quarantine" : {"driver" : "mysql",
|
||||
"host" : "<your_host>",
|
||||
"dbname" : "<amavis_dbname>",
|
||||
"login" : "<user>",
|
||||
"password" : "<password>"}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Replace values between <> with yours.
|
||||
|
||||
@@ -455,9 +455,7 @@ To finish, you need to collect information periodically in order to
|
||||
feed rrd files. To do so, just add the following lines into root's
|
||||
crontab::
|
||||
|
||||
*/5 * * * * PYTHONPATH=<mailng_dir/..> \
|
||||
DJANGO_SETTINGS_MODULE=mailng.settings \
|
||||
<mailng_dir>/extensions/stats/logparser.py
|
||||
*/5 * * * * PYTHONPATH=<mailng_dir/..> DJANGO_SETTINGS_MODULE=mailng.settings <mailng_dir>/extensions/stats/logparser.py
|
||||
|
||||
Replace mailng_dir with the installation path of MailNG.
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@ from django.conf import settings
|
||||
if __name__ == "__main__":
|
||||
conn = db.getconnection("amavis_quarantine")
|
||||
try:
|
||||
max_msg_days = getattr(settings, "MAX_MESSAGES_AGE")
|
||||
max_messages_age = getattr(settings, "MAX_MESSAGES_AGE")
|
||||
except AttributeError:
|
||||
max_messages_age = 14
|
||||
|
||||
print "Deleting messages older than %d days..." % max_msg_days
|
||||
print "Deleting messages older than %d days..." % max_messages_age
|
||||
db.execute(conn, """
|
||||
DELETE FROM msgs WHERE time_num < UNIX_TIMESTAMP()-%d*24*3600;
|
||||
""" % max_msg_days)
|
||||
""" % max_messages_age)
|
||||
|
||||
print "Deleting unreferenced e-mail addresses..."
|
||||
db.execute(conn, """
|
||||
|
||||
Reference in New Issue
Block a user