Post #3825548
2026-07-15 05:48 UTC
@legrex@don.linxx.net Dafür muss man sich auf die Kommandozeile begeben. Von @gunchleoc@mastodon.scot bekam ich dafür dieses Script geschenkt:
#!/bin/bash
MASTODON_HOME=/home/mastodon/live
SCRIPT_HOME=/home/mastodon/emailblock
echo "update blacklist repo"
cd $SCRIPT_HOME/disposable-email-domains/
git pull
echo "converting black and whitelists"
sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g' $SCRIPT_HOME/disposable-email-domains/allowlist.conf | sed 's/ /\n/1000;P;D' > $SCRIPT_HOME/allowlist.conf
sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g' $SCRIPT_HOME/disposable-email-domains/disposable_email_blocklist.conf | sed 's/ /\n/1000;P;D' > $SCRIPT_HOME/denylist.conf
cd $MASTODON_HOME
echo "starting to add maildomains"
while read p;
do
RAILS_ENV=production bin/tootctl email-domain-blocks add $p > /dev/null
done /dev/null
done /dev/null
done /dev/null
done < "$SCRIPT_HOME/ownallowlist.conf"
echo "remove temporary files"
rm $SCRIPT_HOME/allowlist.conf
rm $SCRIPT_HOME/denylist.conf
Ich musste Kleinigkeiten anpassen. Den aktuellen Stand kann ich gern bei Codeberg bereitstellen.
Replies (0)
No replies.