File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,13 @@ filter {
161161 tag_on_failure => [ "_grok_postfix_virtual_nomatch" ]
162162 add_tag => [ "_grok_postfix_success" ]
163163 }
164+ } else if [program] =~ /^postfix.*\/postmap$/ {
165+ grok {
166+ patterns_dir => "/etc/logstash/patterns.d"
167+ match => [ "message", "^%{POSTFIX_POSTMAP}$" ]
168+ tag_on_failure => [ "_grok_postfix_postmap_nomatch" ]
169+ add_tag => [ "_grok_postfix_success" ]
170+ }
164171 } else if [program] =~ /^postfix.*/ {
165172 mutate {
166173 add_tag => [ "_grok_postfix_program_nomatch" ]
Original file line number Diff line number Diff line change @@ -137,3 +137,4 @@ POSTFIX_LOCAL %{POSTFIX_KEYVALUE}|%{POSTFIX_WARNING}
137137POSTFIX_VIRTUAL %{POSTFIX_SMTP_DELIVERY}
138138POSTFIX_ERROR %{POSTFIX_ERROR_ANY}
139139POSTFIX_POSTSUPER %{POSTFIX_POSTSUPER_ACTION}|%{POSTFIX_POSTSUPER_SUMMARY}
140+ POSTFIX_POSTMAP %{POSTFIX_WARNING}
Original file line number Diff line number Diff line change 1+ pattern : ^%{POSTFIX_POSTMAP}$
2+ data : " warning: /etc/postfix/conf.d/users.db: duplicate entry: \" xxx@yyy.com\" "
3+ results :
4+ postfix_message_level : warning
5+ postfix_message : " /etc/postfix/conf.d/users.db: duplicate entry: \" xxx@yyy.com\" "
You can’t perform that action at this time.
0 commit comments