From 2e9d5008c235d65e6bf1943372277ee32ffe5e12 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Fri, 1 Dec 2023 14:50:03 +1300 Subject: [PATCH] Feature: Allow port binding using hostname See #213 --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 68ed16f..a90476f 100644 --- a/config/config.go +++ b/config/config.go @@ -150,7 +150,7 @@ func VerifyConfig() error { DataFile = filepath.Join(DataFile, "mailpit.db") } - re := regexp.MustCompile(`^((\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(\[([\da-fA-F:])+\])):\d+$`) + re := regexp.MustCompile(`.*:\d+$`) if !re.MatchString(SMTPListen) { return errors.New("SMTP bind should be in the format of :") }