cPanel mass delete forwarders

One of the things I miss in cPanel is a way to mass delete forwarders. With the current version of cPanel you need to click the delete link next to each forwarder. Above that you don’t actually delete that forwarder upon clicking, you are taken to a confirm page where you need to click “confirm” in order to actually delete it. Deleting 100 entries can therefore take up quite a lot of time.

To speed things up I’ve knocked up a little JavaScript which:

  1. Replaces all URLs that link to such a confirm page to link to the actual delete page.
  2. Opens up all those links one by one so that the e-mailaddresses actually get deleted.

Usage would be something like this:

  1. In cPanel, go to Forwarders
  2. Use the “search” field to limit the results shown.
  3. Run the script above in the Dev Tools. All addresses shown from the previous step will be deleted.

(You might need to allow popups in your browser for your cPanel URL though)