Follow

To delete users that haven't confirmed the registration mail after 2 weeks, I use this and call it once per week per cron

for i in $(psql -t -U <user> -h <host> mastodon -c "select username from users u, accounts a where account_id=a.id and confirmed_at is null and confirmation_sent_at<now() - interval'2 weeks';") ; do
bin/tootctl accounts delete ${i} 2>/dev/null 1>/dev/null
done

Are there any other useful maintenance tasks, dear fellow 's?

Sign in to participate in the conversation
Mastodon on NerdCulture

All friendly creatures are welcome. Be excellent to each other, live humanism, no nazis, no hate speech. Not only for nerds, but the domain is somewhat cool. ;) No bots in general! (only with prior permission)