Page tree
Skip to end of metadata
Go to start of metadata



The upstream author of the cgiemail scripts has not provided maintenance in a decade. cPanel has provided patches for issues and vulnerabilities when discovered. Recently discovered flaws in the software have caused cPanel to remove support for cgiemail in cPanel & WHM. We have determined that cgiemail is no longer suited for modern shared hosting environments.

How to remove cgiemail and cgiecho


cPanel & WHM version 64 and earlier

For systems running cPanel & WHM version 64 or earlier, cgiemail and cgiecho installed in multiple locations: the cgi-sys directory and the users' cgi-bin directory. You can manually remove these files by running the clean_cgiemail as shown below.

cPanel & WHM version 68

An admin user can remove these copies through a Feature Showcase item in cPanel & WHM version 68. This functionality uses the new clean_cgiemail script (scripts/clean_cgiemail). 

Manual Use of clean_cgiemail

The clean_cgiemail (scripts/clean_cgiemail)script removes the cpanel-cgiemail RPM from the system and the copies of the cgiemail and cgiecho scripts in users' cgi-bin directory. Command line argument flags control this behavior.

Command Line Argument Flags

--rpmCleans the cPanel cgiemail RPM
--docrootCleans the cgiemail scripts from user docroots.


Cleans only the user specified when passed with the --docroot option.
--dryrunDoes not commit changes. This flag will display what will be removed.
--notifySends an iContact notification when the script runs.

Example use:

This example shows you how to remove the cpanel-cgiemail RPM and other copies of the script from user 'foobar':

[root@server:~]# /usr/local/cpanel/scripts/clean_cgiemail --rpm --docroot --user=foobar
info [clean_cgiemail] Removing RPM: cpanel-cgiemail-1.6-5.cp1136.x86_64 ...
info [clean_cgiemail] Success.
info [clean_cgiemail] Removing file: /home/foobar/public_html/cgi-bin/cgiemail ...
info [clean_cgiemail] Success.
info [clean_cgiemail] Found 1 scripts in user docroots.
  • No labels