A Bash script to automatically stop spam signups on Mastodon Docker Compose instances by blocking temporary and throwaway email domains.
It automates downloading crowdsourced blocklists and imports them safely using the native tootctl email-domain-blocks add command.
- Fixes "Argument list too long": Uses
xargsto batch imports (250 domains at a time). This preventstootctlor LinuxARG_MAXerrors when handling large lists of 60,000+ domains. - Security Hardened: Uses strict alphanumeric regex validation (
grep -E) to filter incoming data, preventing command injection or shell exploits from untrusted files.