From ef1f530bb8f2129b76aec57c60b851a1bd0e037a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20C=20McCord?= Date: Sun, 1 Oct 2023 21:32:28 -0400 Subject: [PATCH] make rspamd address configurable --- cmd/inbound/inbound.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/inbound/inbound.go b/cmd/inbound/inbound.go index 7cce17d..2154025 100644 --- a/cmd/inbound/inbound.go +++ b/cmd/inbound/inbound.go @@ -24,6 +24,7 @@ import ( var ( listenPort int healthPort int + rspamAddr string enableTLS bool ) @@ -34,6 +35,7 @@ func init() { flag.IntVar(&listenPort, "smtp", 2525, "port on which to listen for incoming emails") flag.IntVar(&listenPort, "smtps", 2526, "port on which to listen for incoming secure emails") flag.IntVar(&healthPort, "health", 8080, "port on which to listen for health checks") + flag.StringVar(&rspamAddr, "rspamd", "rspam:11332", "address on which rspamd may be found") } func main() { @@ -90,7 +92,7 @@ func main() { AllowedDomains: allowedDomains, Log: log, LMTPAddress: os.Getenv("LMTP_ADDRESS"), - RSpam: milter.NewDefaultClient("tcp", "rspamd:11334"), + RSpam: milter.NewDefaultClient("tcp", rspamAddr), OverallLimiter: rate.NewLimiter(rate.Limit(10), 20), }