TFMail secure replacement for formmail - I needed a good replacement for formmail and found nms-scripts
nms FormMail is a drop-in replacement for Matt Wright's FormMail scrip
is recomended on the Matt Wright's scripts page as an secure and better written FormMail script
But what i will test today is something new TFMail (improved Form Mail) With that script page/encoding for text message can use UTF-8 for form fields and there are more options in the configuration area.
tar -zxvf tfmail.tar.gz
Deny from all
copy the file TFmail.pl into your cgi-bin
cp TFmail.pl ../
complete the recipient field with your email address
change the LIBDIR, CONFIG_ROOT
In my case was '/example/cgi-bin/tfmail'
MAILPROG '/usr/sbin/sendmail -oi -t'
chown apache.apache TFmail.pl (in case you run it with suexec under apache or nobody user)
create an html form like for the formmail script (without recipient field)
< action="http://www.example.com/cgi-bin/TFmail.pl" method="POST" name="test">
< type="text" name="contact" size="40">
Test the contact script www.example.com/contact.html