logcheck step by step

| No Comments | No TrackBacks

This step by step recipe is probably only interesting to myself. It tells me the procedure how to

  • get logcheck from git,
  • develop and test its rules,
  • upload the modifications back to the repository, and
  • build an updated debian package

If you’re you want to help developing logcheck yourself, you probably better read this.

Get or update logcheck from git

Before starting, get logcheck from git

git clone git://git.debian.org/git/logcheck/logcheck.git

or bring it to current state

git pull --rebase

N.B. Browse the the git repository online.

Develop and test rules

Let’s say we want to filter out message like

Sep 16 23:26:30 seamus deliver(vmail): msgid=3ee0701c9180f$a9da4580$0201a8c0@D9MCN291: saved mail to INBOX

As deliver is part of dovecot, the file were rule has to be added or modified is

rulefiles/linux/ignore.d.server/dovecot

Check README.logcheck-database in case it is not clear where to look for or put the rule. To test if the message is not already filtered (because somebody else wrote a rule) do

egrep -v -f rulefiles/linux/ignore.d.server/dovecot

and paste the message or, alternatively, use

egrep -v "[rule]"

to test the rule directly. If the pasted message is echoed, it is not filtered. Thus, add or modify a rule, until the rule fits.

Add an entry to debian/changelog with

dch -a

(leave out the -a to bump the version number) and commit both the rulefile and the changelog with

git add rulefiles/linux/ignore.d.server/dovecot debian/changelog
debcommit -e

Upload the modifications back to the repository

When satisfied, push the changes to the remote repository

git push

Build an updated debian package

No TrackBacks

TrackBack URL: http://edelblog.ch/cgi-bin/movabletype/mt-tb.cgi/2

Leave a comment

About this Entry

This page contains a single entry by hp published on June 10, 2009 12:31 PM.

git step by step is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.