I am moving my personal web site from netlify to a VPS. It runs via Caddy as just a plain, static web site generated from Hugo. Netlify offered a free contact form, but now I need to provide my own solution, somehow.

I’d like to self-host that too, if possible, on the VPS but then I need to handle spam blocking, form validation, possibly capcha, and sending the outbound email myself - and I don’t have experience doing any of that. An AI chatbot suggested a python script using flask but I would still need to do a bunch to make that work, I think.

There are a number of form handling cloud services online (such as staticforms dot xyz) but then the form submissions are going through their servers. My visitors probably wouldn’t care, but I would still prefer to self-host something, if it’s not too hard to setup.

What do you all recommend? Anyone find a clever solution to this already?

I already have a “comments” feature wired into the site - I could just stick with that but some people seem to still prefer to contact me directly, instead of using that.

EDIT: This is all done - thanks for all the great ideas, you all rock!

  • adarza@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    19 hours ago

    the form itself is easy, it’s the bot detection and spam prevention that’s hard. on my own sites, i’ve given-in and use the highest-level recaptcha, a hidden form field triggered by bots but not humans, and a server-side script for the mailing that also has some spam detection routines. they still get through, but far less often than a naked form would.

    if you’re satisfied with your existing comments function, can you simply enable comments on your ‘contact’ page and hide them from public view?

    • perishthethought@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      13 hours ago

      if you’re satisfied with your existing comments function, can you simply enable comments on your ‘contact’ page and hide them from public view?

      I was also struggling with DNS issues all day so this is what I am putting in place for now. Yah, good enough is good enough. Thanks for the idea.