mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-09-15 07:08:40 +00:00
sa-learn: Add documentation
Add POD documentation and tidy up
This commit is contained in:
parent
5c9228a980
commit
10b89a6d67
1 changed files with 53 additions and 18 deletions
|
@ -1,6 +1,41 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
: <<=cut
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
sa-learn - Munin plugin to monitor spamassasin bayes database size
|
||||||
|
|
||||||
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
|
||||||
|
Any server running spamassassin
|
||||||
|
|
||||||
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
|
This plugin assumes your Spamassassin database is in /var/lib/MailScanner.
|
||||||
|
If it's elsewhere (or you want to use a different database) you will need
|
||||||
|
a configuration such as:
|
||||||
|
|
||||||
|
[sa-learn]
|
||||||
|
env.BayesDir /path/to/bayes/directory/
|
||||||
|
user mail
|
||||||
|
|
||||||
|
(where 'user mail' refers to a user that can read the database).
|
||||||
|
|
||||||
|
=head1 MAGIC MARKERS
|
||||||
|
|
||||||
#%# family=contrib
|
#%# family=contrib
|
||||||
|
|
||||||
|
=head1 VERSION
|
||||||
|
|
||||||
|
2
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Paul Saunders L<darac+munin@darac.org.uk>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
#'
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
config)
|
config)
|
||||||
cat <<'EOM'
|
cat <<'EOM'
|
||||||
|
@ -21,7 +56,7 @@ esac
|
||||||
## Print values
|
## Print values
|
||||||
BayesDir=${BayesDir:-/var/lib/MailScanner}
|
BayesDir=${BayesDir:-/var/lib/MailScanner}
|
||||||
|
|
||||||
sa-learn --dbpath $BayesDir --dump magic 2>/dev/null | while read line
|
sa-learn --dbpath $BayesDir/ --dump magic 2>/dev/null | while read line
|
||||||
do
|
do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
*nspam*)
|
*nspam*)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue