diff --git a/INSTALL b/INSTALL index d69119e7f..26ea8b737 100644 --- a/INSTALL +++ b/INSTALL @@ -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" : "", "dbname" : "", "login" : "", "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= \ - DJANGO_SETTINGS_MODULE=mailng.settings \ - /extensions/stats/logparser.py + */5 * * * * PYTHONPATH= DJANGO_SETTINGS_MODULE=mailng.settings /extensions/stats/logparser.py Replace mailng_dir with the installation path of MailNG. diff --git a/extensions/amavis_quarantine/cleanup.py b/extensions/amavis_quarantine/cleanup.py index e1cb531e5..e2b819d08 100755 --- a/extensions/amavis_quarantine/cleanup.py +++ b/extensions/amavis_quarantine/cleanup.py @@ -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, """