Skip to content

Commit

Permalink
Fix for #69: Disable healthcheck logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sdelrio authored and bokysan committed Nov 8, 2021
1 parent 266bfb1 commit 88c94f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion configs/rsyslog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ template(name="plain" type="list") {
}

if $syslogseverity <= '6' then {
# Do not log healthchecks
if ($msg contains "connect from localhost[127.0.0.1]") then { stop }
if ($msg contains "lost connection after EHLO from localhost[127.0.0.1]") then { stop }
if ($msg contains "disconnect from localhost[127.0.0.1] ehlo=1 commands=1") then { stop }
# matching logs will be saved
action(type="omfile" DynaFile="devicelog" template="<log-format>" DirCreateMode="0755" FileCreateMode="0644")
# enable below to stop processing further this log
Expand All @@ -50,4 +54,4 @@ if $syslogseverity <= '6' then {

include(file="/etc/rsyslog.d/*.conf" mode="optional")

stop
stop
5 changes: 1 addition & 4 deletions scripts/postfix.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
#!/bin/sh
/usr/sbin/postfix -c /etc/postfix start-fg | \
fgrep -v 'connect from localhost[127.0.0.1]'
fgrep -v 'lost connection after EHLO from localhost[127.0.0.1]' | \
fgrep -v 'disconnect from localhost[127.0.0.1] ehlo=1 commands=1'
/usr/sbin/postfix -c /etc/postfix start-fg

0 comments on commit 88c94f9

Please sign in to comment.