1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +02:00

Feature: Allow port binding using hostname

See #213
This commit is contained in:
Ralph Slooten 2023-12-01 14:50:03 +13:00
parent cfcb4f0c97
commit 2e9d5008c2

View File

@ -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 <ip>:<port>")
}