Adding FormMail support back into new cPanel Installations

cPanel used to provide a global Formmail script that was located in /cgi-sys/ and as of cPanel version 11.64 it was no longer provided in new installations. Below you will find instructions on how to add this script back onto newer installations so that you wont break your customers sites when moving them to a newer server.

Instructions for CentOS/CloudLinux/RHEL 7

Log into the server via the console or SSH as the user root and run the following commands.

cd /usr/local/cpanel/cgi-sys
unxz formmail.cgi.xz FormMail.cgi.xz FormMail-clone.cgi.xz
/bin/cp formmail.cgi
/bin/cp FormMail.cgi
chown root.wheel formmail.cgi FormMail.cgi FormMail-clone.cgi
chmod 755 formmail.cgi FormMail.cgi FormMail-clone.cgi

A simple test to verify the scripts are working is to call them directly from your web browser. Simply point your web browser to http://SERVER-IP/cgi-sys/formmail.cgi.