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

Leave a comment