File: subject_summarizer.mtail

package info (click to toggle)
mtail 3.0.0~rc24.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 6,944 kB
  • sloc: yacc: 530; makefile: 181; sh: 141; lisp: 77; awk: 17
file content (12 lines) | stat: -rw-r--r-- 291 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# subject_summarizer -- a mtail module which monitors a mbox file
#
# This mtail module watches mbox files, and provides a summary of the
# subject lines it sees.

counter subject_lines_seen by subject

const SUBJECT_LINE /^Subject: (.*)$/

// + SUBJECT_LINE {
  subject_lines_seen[$1] ++
}