Skip to content

Commit

Permalink
Adds a simple mtail program for counting subject lines in an mbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Nov 7, 2018
1 parent cc640a8 commit 536bebb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions subject_summarizer.mtail
Original file line number Diff line number Diff line change
@@ -0,0 +1,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] ++
}

0 comments on commit 536bebb

Please sign in to comment.