Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ThomasLeister/19cdd3a67a0de3e07867431318c11a22 to your computer and use it in GitHub Desktop.
Save ThomasLeister/19cdd3a67a0de3e07867431318c11a22 to your computer and use it in GitHub Desktop.
Delete Ejabberd accounts by JID list
##
## Create a "spammers.txt" file with all the JIDs (Jabber IDs) to delete. One in each line:
## [email protected]
## [email protected]
## [email protected]
## ...
## then run this command:
cat spammers.txt | xargs -L1 -i bash -c 'jid={}; name=${jid%@*}; domain=${jid##*@}; ejabberdctl unregister $name $domain; echo "deleted $jid"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment