Rsyslog logging for postfix, optional logging to file, no logging of test requests

This commit is contained in:
Michael Wyraz
2020-04-09 14:34:54 +02:00
parent 6518ef19af
commit e979743226
5 changed files with 50 additions and 4 deletions

View File

@@ -37,6 +37,9 @@ os.environ["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN",
os.environ["ANTISPAM_MILTER_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_MILTER", "antispam:11332")
os.environ["LMTP_ADDRESS"] = system.get_host_address_from_environment("LMTP", "imap:2525")
conf.jinja("/conf/rsyslog.conf", os.environ, "/etc/rsyslog.conf")
for postfix_file in glob.glob("/conf/*.cf"):
conf.jinja(postfix_file, os.environ, os.path.join("/etc/postfix", os.path.basename(postfix_file)))
@@ -61,6 +64,9 @@ if "RELAYUSER" in os.environ:
conf.jinja("/conf/sasl_passwd", os.environ, path)
os.system("postmap {}".format(path))
# Start rsyslog
os.system("/usr/sbin/rsyslogd -n &")
# Run Podop and Postfix
multiprocessing.Process(target=start_podop).start()
os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing")