mirror of
https://github.com/therootcompany/golib.git
synced 2026-04-24 12:48:00 +00:00
Drop-in replacement for the legacy standalone form2mail binary.
Preserves CLI flags, env vars, .env loading, password prompt, response
file hot-reload, field mapping (input_1/3/4/5/7), rate limit (5/min,
burst 3), North-America country gate, .ru silent-drop, routes, startup
banner, and [REDACTED] placeholder for bot rejections.
Changes vs. legacy:
- Replaces embedded iploc with net/geoip (requires GeoIP.conf)
- Reads bitwire-it repo's native layout (tables/inbound/*) instead of
a hand-managed flat inbound.txt
- gitshallow.Repo with GCInterval=24 keeps .git from accumulating
orphaned blobs after hourly upstream updates
formmailer additions to support form2mail's legacy behavior:
- SuccessBodyFunc / ErrorBodyFunc — per-request body providers for
hot-reloadable templates
- HiddenSupportValue — string to render in place of {.SupportEmail}
for blacklist/bot rejections (form2mail uses "[REDACTED]")
31 lines
1.1 KiB
Modula-2
31 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.0.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/sys v0.40.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 v0.0.0 => ../../net/httpcache
|
|
github.com/therootcompany/golib/net/ipcohort v0.0.0 => ../../net/ipcohort
|
|
github.com/therootcompany/golib/sync/dataset v0.0.0 => ../../sync/dataset
|
|
)
|