mirror of
https://github.com/marcus-alicia/iRedAdmin-Pro-SQL.git
synced 2026-05-26 07:08:10 +00:00
Update to V5.5
This commit is contained in:
@@ -126,11 +126,16 @@ while True:
|
||||
logger.info('Delete incoming/outgoing emails which older than %d days' % keep_inout_days)
|
||||
|
||||
_now = int(time.time())
|
||||
_expire_seconds = _now - (keep_inout_days * 86400)
|
||||
sql_where = """time_num < %d AND (quar_type <> 'Q' OR quar_type IS NULL)""" % _expire_seconds
|
||||
|
||||
if settings.AMAVISD_REMOVE_QUARANTINED_IN_DAYS <= settings.AMAVISD_REMOVE_MAILLOG_IN_DAYS:
|
||||
_expire_seconds = _now - (keep_inout_days * 86400)
|
||||
else:
|
||||
_expire_seconds = _now - (keep_quar_days * 86400)
|
||||
|
||||
sql_where = """time_num < %d""" % _expire_seconds
|
||||
|
||||
# We experienced an issue with PostgreSQL, it always return an non-existing
|
||||
# SQL record, and it causes endless loop. As a hack, we store all removed
|
||||
# SQL record, and it causes endless loop. As a workaround, we store all removed
|
||||
# `mail_id` and compare new `mail_id` with this list.
|
||||
_removed_ids = set()
|
||||
|
||||
|
||||
@@ -760,18 +760,11 @@ elif egrep '^backend.*mysql' ${IRA_CONF_PY} &>/dev/null; then
|
||||
elif egrep '^backend.*pgsql' ${IRA_CONF_PY} &>/dev/null; then
|
||||
[ X"$(has_python_module psycopg2)" == X'NO' ] && REQUIRED_PKGS="${REQUIRED_PKGS} ${PKG_PY_PGSQL}"
|
||||
fi
|
||||
|
||||
[ X"$(has_python_module pip)" == X'NO' ] && REQUIRED_PKGS="${REQUIRED_PKGS} ${PKG_PY_PIP}"
|
||||
[ X"$(has_python_module simplejson)" == X'NO' ] && REQUIRED_PKGS="${REQUIRED_PKGS} ${PKG_PY_JSON}"
|
||||
[ X"$(has_python_module dns)" == X'NO' ] && REQUIRED_PKGS="${REQUIRED_PKGS} ${PKG_PY_DNS}"
|
||||
[ X"$(has_python_module requests)" == X'NO' ] && REQUIRED_PKGS="${REQUIRED_PKGS} ${PKG_PY_REQUESTS}"
|
||||
if [ X"$(has_python_module web)" == X'NO' ]; then
|
||||
PIP3_MODS="${PIP3_MODS} web.py>=0.61"
|
||||
else # Verify module version.
|
||||
_webpy_ver=$(${CMD_PYTHON3} -c "import web; print(web.__version__)")
|
||||
if echo ${_webpy_ver} | grep '^0\.[45]' &>/dev/null; then
|
||||
PIP3_MODS="${PIP3_MODS} web.py>=0.61"
|
||||
fi
|
||||
fi
|
||||
[ X"$(has_python_module jinja2)" == X'NO' ] && REQUIRED_PKGS="${REQUIRED_PKGS} ${PKG_PY_JINJA}"
|
||||
|
||||
if [ X"${REQUIRED_PKGS}" != X'' ]; then
|
||||
|
||||
Reference in New Issue
Block a user