In this reply, an AM posts that he uses Matt's formmail program so as not to reinvent the wheel. The problem is that this wheel is very broken, and we need a new wheel.

Matt's FormMail has many problems, but one of the biggest is its lack of security. Any instance of FormMail can be used as a spam gateway, because FormMail uses hidden form variables to specify recipient(s) and message subject. Do you want your forms used as spammer tools? Sure, FormMail checks the referrer--but referrers are trivially faked, and this is *not* good enough protection.

We need a good alternative to FormMail. I think (bias) that STAMP can be such an alternative.

I wrote STAMP (Secure, Template-Aware Mail Processor) as a more secure alternative to FormMail. It uses server-side configuration files, so spammers can't use the form as an arbitrary email gateway; it supports all of the options used in FormMail; and it supports the use of templates (using HTML::Template) to customize mail messages sent to the recipient(s) of the form data.

I don't think that STAMP is the only possible alternative, of course, and it's possible that it wouldn't even be the best solution for FormMail users. It requires the use of CPAN modules, for example, which could be a possible turnoff to users who just want a simple form mailer. And it's not even the only alternative (I'm thinking specifically of Not Matt's Scripts, here).

Anyway, it's pretty well documented; it is, I believe, secure, not buggy, etc.; and I like it. :) If anyone wishes to give me a security review, here is the source.


In reply to Secure form mail processing by btrott

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.