You're now seconds away from working forms for your static html site.
This is a shell script for installing and configuring FormMail v1.9.3 on a DigitalOcean server that's been configured by ServerPilot so that an App is able to send form submission emails. Great for static html sites that don't want to use php.
Basically this is an automation of:
- https://serverpilot.io/docs/how-to-create-a-cgi-bin-directory/
- http://www.scriptarchive.com/formmail.html
You run this script locally, give it the info it needs to connect and configure everything, it sets everything up and then gives you a starter/sample form to test mail delivery with.
Important Notes:
- FormMail has had vulnerabilities in the past. This script uses the newest version (v1.9.3)
- You may want to rename your formmail folder and FormMail.pl script for some added security.
- This counts as a customization that could complicate/nullify your ServerPilot support options.
- Make sure to
chmod 755 install-formmail.sh
the installer so it has the correct permissions required to run. - Run on your local machine with
./install-formmail.sh
- Works best if you have SSH keys already set for your root user and for your ServerPilot user. [Instructions]
- Via SFTP, delete your
cgi-bin
folder and it's contents. - Via SFTP, delete your
public/formmail-test.html
file. - Via SSH (as root user), delete
/etc/apache-sp/vhosts.d/[APPNAME].d/cgi-bin.conf