Add ham/spam cutoff parameters to spamfilter
This commit is contained in:
8
confd/conf.d/spamfilter.toml
Normal file
8
confd/conf.d/spamfilter.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
[template]
|
||||
src = "spamfilter.tmpl"
|
||||
dest = "/usr/local/bin/spamfilter"
|
||||
mode = "0755"
|
||||
keys = [
|
||||
"/bogofilter/ham/cutoff",
|
||||
"/bogofilter/spam/cutoff",
|
||||
]
|
||||
6
confd/templates/spamfilter.tmpl
Executable file
6
confd/templates/spamfilter.tmpl
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# pass mail through spam filter Bogofilter
|
||||
# arguments are passed on to sendmail
|
||||
|
||||
/usr/bin/bogofilter -d /vmail/bogofilter -p {{ with getv "/bogofilter/ham/cutoff" }}--ham-cutoff {{.}}{{ end }} {{ with getv "/bogofilter/spam/cutoff" }}--spam-cutoff {{.}}{{ end }} | /usr/sbin/sendmail "$@"
|
||||
Reference in New Issue
Block a user