1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-08-13 20:04:49 +02:00

Fix: Use correct parameter order in SpamAssassin socket detection (#364)

Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
cui fliter
2024-09-26 23:04:52 +08:00
committed by GitHub
parent 7f4cd90c03
commit a64950ddea

View File

@@ -71,7 +71,7 @@ func Ping() error {
}
var client *spamc.Client
if strings.HasPrefix("unix:", service) {
if strings.HasPrefix(service, "unix:") {
client = spamc.NewUnix(strings.TrimLeft(service, "unix:"))
} else {
client = spamc.NewTCP(service, timeout)
@@ -112,7 +112,7 @@ func Check(msg []byte) (Result, error) {
}
} else {
var client *spamc.Client
if strings.HasPrefix("unix:", service) {
if strings.HasPrefix(service, "unix:") {
client = spamc.NewUnix(strings.TrimLeft(service, "unix:"))
} else {
client = spamc.NewTCP(service, timeout)