| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 1 | @version: 4.5 |
| Matthias Andreas Benkard | 4edeb9f | 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 | use_fqdn(no); |
| 8 | owner("root"); group("adm"); perm(0640); |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 9 | stats(freq(0)); |
| 10 | keep_timestamp(no); |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 11 | bad_hostname("^gconfd$"); |
| 12 | }; |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 13 | source s_dgram { |
| 14 | unix-dgram("/dev/log"); |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 15 | internal(); |
| 16 | }; |
| 17 | destination d_stdout { pipe("/dev/stdout"); }; |
| 18 | destination d_redis_ui_log { |
| 19 | redis( |
| 20 | host("redis-mailcow") |
| 21 | persist-name("redis1") |
| 22 | port(6379) |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame] | 23 | auth("`REDISPASS`") |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 24 | command("LPUSH" "DOVECOT_MAILLOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n") |
| 25 | ); |
| 26 | }; |
| 27 | destination d_redis_f2b_channel { |
| 28 | redis( |
| 29 | host("redis-mailcow") |
| 30 | persist-name("redis2") |
| 31 | port(6379) |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame] | 32 | auth("`REDISPASS`") |
| Matthias Andreas Benkard | 8f91594 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 33 | command("PUBLISH" "F2B_CHANNEL" "$(sanitize $MESSAGE)") |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 34 | ); |
| 35 | }; |
| 36 | filter f_mail { facility(mail); }; |
| 37 | filter f_replica { |
| 38 | not match("User has no mail_replica in userdb" value("MESSAGE")); |
| 39 | not match("Error: sync: Unknown user in remote" value("MESSAGE")); |
| 40 | }; |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame] | 41 | filter f_dovecot_auth_try { |
| 42 | not match("- trying the next passdb" value("MESSAGE")) and |
| 43 | not match("- trying the next userdb" value("MESSAGE")); |
| 44 | }; |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 45 | log { |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 46 | source(s_dgram); |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame] | 47 | filter(f_dovecot_auth_try); |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 48 | filter(f_replica); |
| 49 | destination(d_stdout); |
| 50 | filter(f_mail); |
| 51 | destination(d_redis_ui_log); |
| 52 | destination(d_redis_f2b_channel); |
| 53 | }; |