Files
docker-image-postfix/templates/start.d/spamfilter
2026-01-17 23:52:34 -03:00

7 lines
368 B
Bash

#!/bin/bash
# pass mail through spam filter Bogofilter
# arguments are passed on to sendmail
/usr/bin/bogofilter -d /vmail/bogofilter -p {{ if getenv "BOGOFILTER_HAM_CUTOFF" }}--ham-cutoff '{{ getenv "BOGOFILTER_HAM_CUTOFF" }}'{{ end }} {{ if getenv "BOGOFILTER_SPAM_CUTOFF" }}--spam-cutoff '{{ getenv "BOGOFILTER_SPAM_CUTOFF" }}'{{ end }} | /usr/sbin/sendmail "$@"