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)

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.