Skip to content

Commit

Permalink
Merge pull request #183 from whyscream/182-postfix-queue-id-position
Browse files Browse the repository at this point in the history
Some warning messages have the queue-id after the warning level
  • Loading branch information
whyscream authored Jan 15, 2024
2 parents cdeadb0 + 3b3d93a commit 2289f26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postfix.grok
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ GREEDYDATA_NO_BRACKET [^<>]*
STATUS_WORD [\w-]*

# warning patterns
POSTFIX_WARNING_WITH_KV (%{POSTFIX_QUEUEID:postfix_queueid}: )?%{POSTFIX_WARNING_LEVEL:postfix_message_level}: (%{POSTFIX_CLIENT_INFO}: )?%{GREEDYDATA:postfix_message}; %{POSTFIX_KEYVALUE_DATA:postfix_keyvalue_data}
POSTFIX_WARNING_WITHOUT_KV (%{POSTFIX_QUEUEID:postfix_queueid}: )?%{POSTFIX_WARNING_LEVEL:postfix_message_level}: (%{POSTFIX_CLIENT_INFO}: )?%{GREEDYDATA:postfix_message}
POSTFIX_WARNING_WITH_KV (%{POSTFIX_QUEUEID:postfix_queueid}: )?%{POSTFIX_WARNING_LEVEL:postfix_message_level}: (%{POSTFIX_QUEUEID:postfix_queueid}: )?(%{POSTFIX_CLIENT_INFO}: )?%{GREEDYDATA:postfix_message}; %{POSTFIX_KEYVALUE_DATA:postfix_keyvalue_data}
POSTFIX_WARNING_WITHOUT_KV (%{POSTFIX_QUEUEID:postfix_queueid}: )?%{POSTFIX_WARNING_LEVEL:postfix_message_level}: (%{POSTFIX_QUEUEID:postfix_queueid}: )?(%{POSTFIX_CLIENT_INFO}: )?%{GREEDYDATA:postfix_message}
POSTFIX_WARNING %{POSTFIX_WARNING_WITH_KV}|%{POSTFIX_WARNING_WITHOUT_KV}

# smtpd patterns
Expand Down
6 changes: 6 additions & 0 deletions test/cleanup_0012.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pattern: ^%{POSTFIX_CLEANUP}$
data: "warning: 9BECF3F19D: sender_canonical_maps map lookup problem for [email protected] -- message not accepted, try again later"
results:
postfix_queueid: 9BECF3F19D
postfix_message_level: warning
postfix_message: "sender_canonical_maps map lookup problem for [email protected] -- message not accepted, try again later"

0 comments on commit 2289f26

Please sign in to comment.