AJ ONeal ac7047c77c
feat(cmd/form2mail): production contact-form server
Wires formmailer + ipcohort + geoip + gitshallow into a long-running
HTTP server. Adds graceful SIGTERM via signal.NotifyContext +
http.Server.Shutdown so deploys complete in seconds instead of waiting
for the systemd 90s SIGKILL. Trusts RFC1918 CIDRs (loopback + 10/8 +
172.16/12 + 192.168/16) for X-Forwarded-For so the upstream TLS router
can pass through the real client IP.

Includes a rename-old-first deploy script (avoids ETXTBSY on running
ELFs), HTML success/error templates that hot-reload from disk on each
request, and a silent-drop spam trap for .ru sender addresses.
2026-09-08 15:28:36 -06:00

32 lines
1.1 KiB
Modula-2

module github.com/therootcompany/golib/cmd/form2mail
go 1.26.0
require (
github.com/joho/godotenv v1.5.1
github.com/therootcompany/golib/net/formmailer v0.0.0
github.com/therootcompany/golib/net/geoip v0.0.0
github.com/therootcompany/golib/net/gitshallow v0.0.0
github.com/therootcompany/golib/net/httpcache v0.5.0
github.com/therootcompany/golib/net/ipcohort v0.0.0
github.com/therootcompany/golib/sync/dataset v0.0.0
golang.org/x/term v0.39.0
)
require (
github.com/oschwald/geoip2-golang v1.13.0 // indirect
github.com/oschwald/maxminddb-golang v1.13.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/time v0.15.0 // indirect
)
replace (
github.com/therootcompany/golib/net/formmailer v0.0.0 => ../../net/formmailer
github.com/therootcompany/golib/net/geoip v0.0.0 => ../../net/geoip
github.com/therootcompany/golib/net/gitshallow v0.0.0 => ../../net/gitshallow
github.com/therootcompany/golib/net/httpcache => ../../net/httpcache
github.com/therootcompany/golib/net/ipcohort v0.0.0 => ../../net/ipcohort
github.com/therootcompany/golib/sync/dataset v0.0.0 => ../../sync/dataset
)