Ich muss auch sagen, auch trotz rpsamd und echt großem Wortfilter und wirklich stündlichem lernen von Spam geht noch unglaubelich viel Spam durch.
Bei mir habe ich die Wortfiltersache so gelöst (muss auch sagen, dass es wirklich schön wäre, wenn es in den Standard von Keyhelp einzug finden könnte):
subject_blacklister.sh - Symlink auf /usr/sbin/subjectblacklister und verwende es dann in der Konsole so.
Code: Select all
subjectblacklister -w "Tabletten"
subjectblacklister -s "Rezeptfreies Kokain"
Code: Select all
#!/bin/bash
cd /
strMapFile=/etc/rspamd/maps.d/blacklist_subject.map
function sentence() {
regsen=$(echo $1 | sed 's/ /\\s*/g')
echo "/.*${regsen}.*/i" >> $strMapFile
}
function word() {
regword=$(echo $1)
if ! grep -q $1 $strMapFile; then
echo "/.*${regword}.*/i" >> $strMapFile
fi
}
case "$1" in
"-w")
word "$2"
;;
"-s")
sentence "$2"
;;
"--find")
cat /etc/rspamd/maps.d/blacklist_subject.map | grep -i $2
;;
"--edit")
nano /etc/rspamd/maps.d/blacklist_subject.map
;;
*)
echo "choose -w word | -s sentence | --find <string> to check map file | --edit to edit the subject file"
exit 0
;;
esac
systemctl restart rspamd.service
exit 0
Damit es mit meine rspamd-Konfiguration (nicht lange) ausreißt, wenn ich im Frontend mal etwas änder oder ein Update kommt, lasse ich das hier jede Minute im cronjob laufen.
Code: Select all
## ---> Server: rspamd Subject Blacklisting
*/1 * * * * root /opt/scripts/rspamdhelper/multimapcheck.sh >> /dev/null 2>&1
multimapcheck.sh
Code: Select all
#!/bin/bash -e
if ! grep -q "SUBJECT_BLACKLISTED" /etc/rspamd/local.d/multimap.conf; then
echo -e "" >> /etc/rspamd/local.d/multimap.conf
cat <<EOF >> "/etc/rspamd/local.d/multimap.conf"
SUBJECT_BLACKLISTED {
type = "header";
header = "Subject";
map = "/etc/rspamd/maps.d/blacklist_subject.map";
regexp = true;
action = "reject";
description = "Blacklist map for SUBJECT_BLACKLISTED";
}
EOF
systemctl restart rspamd
fi
exit 0
Die Konstellation sorgt schon für wesentlich mehr Ruhe, aber allgemein ist noch viel Luft nach oben vorhanden. Zu all dem nutze ich noch die Mail Filter von
abuseIX.