Skip to content

Commit

Permalink
Merge pull request #241 from hp197/fix-postfix-submission
Browse files Browse the repository at this point in the history
[examples] Fixed postfix matching with submission
  • Loading branch information
jaqx0r committed Jul 6, 2019
2 parents f79ecf1 + 52b90d0 commit d868310
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/postfix.mtail
Expand Up @@ -15,7 +15,7 @@ const QMGR_INSERT_LINE /:.*, size=(?P<size>\d+), nrcpt=(?P<nrcpt>\d+)/
const QMGR_REMOVE_LINE /: removed$/

/^(?P<date>(?P<legacy_date>\w+\s+\d+\s+\d+:\d+:\d+)|(?P<rfc3339_date>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d+[+-]\d{2}:\d{2}))/ +
/\s+(?:\w+@)?(?P<hostname>[\w\.-]+)\s+postfix\/(?P<application>[\w\.-]+)(?:\[(?P<pid>\d+)\])?:\s+(?P<message>.*)/ {
/\s+(?:\w+@)?(?P<hostname>[\w\.-]+)\s+postfix\/(?P<application>[\w\.-\/]+)(?:\[(?P<pid>\d+)\])?:\s+(?P<message>.*)/ {
len($legacy_date) > 0 {
strptime($2, "Jan _2 15:04:05")
}
Expand Down Expand Up @@ -149,7 +149,7 @@ const QMGR_REMOVE_LINE /: removed$/
# Total number of incoming TLS connections.
counter postfix_smtpd_tls_connections_total by trust, protocol, cipher, secret_bits, algorithm_bits

$application == "smtpd" {
$application =~ /smtpd/ {
/ connect from / {
postfix_smtpd_connects_total++
}
Expand Down

0 comments on commit d868310

Please sign in to comment.