From b0444be489dd4101a07e5fae89b41f63f09de5a8 Mon Sep 17 00:00:00 2001 From: Myve Date: Mon, 19 Aug 2024 01:34:00 +0000 Subject: [PATCH] Try out busybox-syslog --- build/Dockerfile.ubuntu | 1 + build/run/docker-entrypoint/entrypoint.sh | 5 +++-- build/run/installer.sh | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/build/Dockerfile.ubuntu b/build/Dockerfile.ubuntu index cee3b33..d9a5574 100644 --- a/build/Dockerfile.ubuntu +++ b/build/Dockerfile.ubuntu @@ -25,6 +25,7 @@ RUN apt remove -y nano* exim*; \ && apt dist-upgrade -y \ && bash -c "echo \"postfix postfix/main_mailer_type string 'Internet Site'\" | debconf-set-selections" \ && apt install -y \ + busybox-syslogd \ ca-certificates \ git wget bind9-host acl dbconfig-no-thanks at \ nginx \ diff --git a/build/run/docker-entrypoint/entrypoint.sh b/build/run/docker-entrypoint/entrypoint.sh index a2bdc26..164dfe5 100755 --- a/build/run/docker-entrypoint/entrypoint.sh +++ b/build/run/docker-entrypoint/entrypoint.sh @@ -22,7 +22,8 @@ ${reset}" } # Reset logs -echo | tee /var/log/dovecot.log /var/log/postfix.log /usr/share/webapps/roundcube/logs/errors.log >/dev/null +echo | tee /var/log/maillog /usr/share/webapps/roundcube/logs/errors.log >/dev/null +syslogd -O /var/log/maillog # Run all scripts in init folder for file in /docker-entrypoint/init.d/*.sh @@ -36,4 +37,4 @@ postfix reload && echo -e "\n\e[1;32mMail service is ready\e[0m\n" # Monitor log -tail -f /var/log/dovecot.log /var/log/postfix.log /usr/share/webapps/roundcube/logs/errors.log +tail -f /var/log/maillog /usr/share/webapps/roundcube/logs/errors.log diff --git a/build/run/installer.sh b/build/run/installer.sh index 17c4ac0..e895851 100755 --- a/build/run/installer.sh +++ b/build/run/installer.sh @@ -67,8 +67,8 @@ postconf -e "smtp_tls_mandatory_protocols = >=TLSv1.2" postconf -e "smtpd_tls_protocols = >=TLSv1.2" postconf -e "smtp_tls_protocols = >=TLSv1.2" -# Logging -postconf -e "maillog_file = /var/log/postfix.log" +# # Logging +# postconf -e "maillog_file = /var/log/postfix.log" # Virtual mailboxes postconf -e "mailbox_transport = lmtp:unix:private/dovecot-lmtp" @@ -178,8 +178,8 @@ tee -a /etc/dovecot/dovecot.conf >/dev/null <<- dovecot.conf protocols = imap lmtp dovecot.conf -# Logging -echo "log_path = /var/log/dovecot.log" >/etc/dovecot/conf.d/10-logging.conf +# # Logging +# echo "log_path = /var/log/dovecot.log" >/etc/dovecot/conf.d/10-logging.conf # 10-auth.conf sed '/include auth-sql.conf.ext\|disable_plaintext_auth =\|auth_username_format =\|auth_mechanisms =\|auth_default_realm =\|include auth-system.conf.ext/d' \