diff --git a/core/postfix/Dockerfile b/core/postfix/Dockerfile index 50be8d5c..57ac7210 100644 --- a/core/postfix/Dockerfile +++ b/core/postfix/Dockerfile @@ -9,7 +9,7 @@ RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart RUN pip3 install git+https://github.com/Nebukadneza/Podop.git@fix_py37 # Image specific layers under this line -RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-plain rsyslog +RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-plain COPY conf /conf COPY start.py /start.py diff --git a/core/postfix/conf/main.cf b/core/postfix/conf/main.cf index 7fb32b67..5ad39a3c 100644 --- a/core/postfix/conf/main.cf +++ b/core/postfix/conf/main.cf @@ -2,6 +2,9 @@ # General ############### +# Logging configuration +maillog_file = /dev/stdout + # Main domain and hostname mydomain = {{ DOMAIN }} myhostname = {{ HOSTNAMES.split(",")[0] }} diff --git a/core/postfix/conf/master.cf b/core/postfix/conf/master.cf index 04df550c..b43095ee 100644 --- a/core/postfix/conf/master.cf +++ b/core/postfix/conf/master.cf @@ -33,3 +33,5 @@ discard unix - - n - - discard lmtp unix - - n - - lmtp anvil unix - - n - 1 anvil scache unix - - n - 1 scache +postlog unix-dgram n - n - 1 postlogd + diff --git a/core/postfix/conf/rsyslog.conf b/core/postfix/conf/rsyslog.conf deleted file mode 100644 index 13353b80..00000000 --- a/core/postfix/conf/rsyslog.conf +++ /dev/null @@ -1,4 +0,0 @@ -$ModLoad imuxsock -$template noTimestampFormat,"%syslogtag%%msg%\n" -$ActionFileDefaultTemplate noTimestampFormat -*.*;auth,authpriv.none /dev/stdout diff --git a/core/postfix/start.py b/core/postfix/start.py index a5a6db06..407ddd83 100755 --- a/core/postfix/start.py +++ b/core/postfix/start.py @@ -48,12 +48,9 @@ for map_file in glob.glob("/overrides/*.map"): os.system("postmap {}".format(destination)) os.remove(destination) -convert("/conf/rsyslog.conf", "/etc/rsyslog.conf") - # Run Podop and Postfix multiprocessing.Process(target=start_podop).start() if os.path.exists("/var/run/rsyslogd.pid"): os.remove("/var/run/rsyslogd.pid") os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing") -os.system("/usr/libexec/postfix/master &") -os.execv("/usr/sbin/rsyslogd", ["rsyslogd", "-n"]) +os.system("postfix start-fg")