diff --git a/internal/spamassassin/spamassassin.go b/internal/spamassassin/spamassassin.go index 57f0cc9c0..044c897fe 100644 --- a/internal/spamassassin/spamassassin.go +++ b/internal/spamassassin/spamassassin.go @@ -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)