Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 1 | @version: 3.28 |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 2 | @include "scl.conf" |
| 3 | options { |
| 4 | chain_hostnames(off); |
| 5 | flush_lines(0); |
| 6 | use_dns(no); |
| 7 | dns_cache(no); |
| 8 | use_fqdn(no); |
| 9 | owner("root"); group("adm"); perm(0640); |
| 10 | stats_freq(0); |
| 11 | bad_hostname("^gconfd$"); |
| 12 | }; |
| 13 | source s_src { |
| 14 | unix-stream("/dev/log"); |
| 15 | internal(); |
| 16 | }; |
| 17 | destination d_stdout { pipe("/dev/stdout"); }; |
| 18 | destination d_redis_ui_log { |
| 19 | redis( |
| 20 | host("`REDIS_SLAVEOF_IP`") |
| 21 | persist-name("redis1") |
| 22 | port(`REDIS_SLAVEOF_PORT`) |
| 23 | command("LPUSH" "POSTFIX_MAILLOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n") |
| 24 | ); |
| 25 | }; |
| 26 | destination d_redis_f2b_channel { |
| 27 | redis( |
| 28 | host("`REDIS_SLAVEOF_IP`") |
| 29 | persist-name("redis2") |
| 30 | port(`REDIS_SLAVEOF_PORT`) |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 31 | command("PUBLISH" "F2B_CHANNEL" "$(sanitize $MESSAGE)") |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 32 | ); |
| 33 | }; |
| 34 | filter f_mail { facility(mail); }; |
| 35 | # start |
| 36 | # overriding warnings are still displayed when the entrypoint runs its initial check |
| 37 | # warnings logged by postfix-mailcow to syslog are hidden to reduce repeating msgs |
| 38 | # Some other warnings are ignored |
| 39 | filter f_ignore { |
| 40 | not match("overriding earlier entry" value("MESSAGE")); |
| 41 | not match("TLS SNI from checks.mailcow.email" value("MESSAGE")); |
| 42 | not match("no SASL support" value("MESSAGE")); |
| 43 | not facility (local0, local1, local2, local3, local4, local5, local6, local7); |
| 44 | }; |
| 45 | # end |
| 46 | log { |
| 47 | source(s_src); |
| 48 | filter(f_ignore); |
| 49 | destination(d_stdout); |
| 50 | filter(f_mail); |
| 51 | destination(d_redis_ui_log); |
| 52 | destination(d_redis_f2b_channel); |
| 53 | }; |