1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-04-01 21:27:22 +02:00

add DNSSEC

* sign zones
* in a cron job, periodically re-sign zones because they expire (not tested)
This commit is contained in:
Joshua Tauberer
2014-06-17 22:21:12 +00:00
parent aaa735dbfe
commit 88709506f8
4 changed files with 234 additions and 18 deletions

View File

@@ -1,11 +1,16 @@
def load_environment():
# Load settings from /etc/mailinabox.conf.
import os.path
env = { }
for line in open("/etc/mailinabox.conf"): env.setdefault(*line.strip().split("=", 1))
env = load_env_vars_from_file("/etc/mailinabox.conf")
env["CONF_DIR"] = os.path.join(os.path.dirname(__file__), "../conf")
return env
def load_env_vars_from_file(fn):
# Load settings from a KEY=VALUE file.
env = { }
for line in open(fn): env.setdefault(*line.strip().split("=", 1))
return env
def exclusive_process(name):
# Ensure that a process named `name` does not execute multiple
# times concurrently.