From 41e5941d0196c08d046dceb9851b9872d66126ec Mon Sep 17 00:00:00 2001 From: Myve Date: Mon, 19 Aug 2024 02:08:47 +0000 Subject: [PATCH] Redirect roundcube logs to syslog --- build/run/docker-entrypoint/entrypoint.sh | 4 ++-- .../run/docker-entrypoint/init.d/20-nginx.sh | 22 ++++--------------- build/run/installer.sh | 5 ++++- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/build/run/docker-entrypoint/entrypoint.sh b/build/run/docker-entrypoint/entrypoint.sh index 164dfe5..0ba0bfd 100755 --- a/build/run/docker-entrypoint/entrypoint.sh +++ b/build/run/docker-entrypoint/entrypoint.sh @@ -22,7 +22,7 @@ ${reset}" } # Reset logs -echo | tee /var/log/maillog /usr/share/webapps/roundcube/logs/errors.log >/dev/null +echo | tee /var/log/maillog /var/log/maillog.debug >/dev/null syslogd -O /var/log/maillog # Run all scripts in init folder @@ -37,4 +37,4 @@ postfix reload && echo -e "\n\e[1;32mMail service is ready\e[0m\n" # Monitor log -tail -f /var/log/maillog /usr/share/webapps/roundcube/logs/errors.log +tail -f /var/log/maillog diff --git a/build/run/docker-entrypoint/init.d/20-nginx.sh b/build/run/docker-entrypoint/init.d/20-nginx.sh index cad261b..2b6c6a1 100755 --- a/build/run/docker-entrypoint/init.d/20-nginx.sh +++ b/build/run/docker-entrypoint/init.d/20-nginx.sh @@ -15,6 +15,10 @@ echo "/dev/null @@ -37,21 +41,3 @@ chmod 0600 /usr/share/webapps/roundcube/plugins/password/config.inc.php # Start services /usr/sbin/php-fpm* -D nginx - -# <<- ##appendix -# \$config['imap_conn_options'] = array( -# 'ssl' => array( -# 'verify_peer' => true, -# 'verify_peer_name' => true, -# 'allow_self_signed' => true, -# ), -# ); -# -# \$config['smtp_conn_options'] = array( -# 'ssl' => array( -# 'verify_peer' => true, -# 'verify_peer_name' => true, -# 'allow_self_signed' => true, -# ), -# ); -# ##appendix diff --git a/build/run/installer.sh b/build/run/installer.sh index 44dcf81..47121e0 100755 --- a/build/run/installer.sh +++ b/build/run/installer.sh @@ -486,4 +486,7 @@ cp /usr/local/bin/postwhite/postwhite.conf /etc #// Syslog #// ############### -echo 'mail.* /var/log/maillog' >/etc/syslog.conf +cat >/etc/syslog.conf <<- 'syslog.conf' +mail.info /var/log/maillog +mail.* /var/log/maillog.debug +syslog.conf