|
@@ -13,9 +13,10 @@ import (
|
|
|
|
|
|
log "github.com/Sirupsen/logrus"
|
|
|
|
|
|
- "github.com/flashmob/go-guerrilla/backends"
|
|
|
"sync"
|
|
|
"sync/atomic"
|
|
|
+
|
|
|
+ "github.com/flashmob/go-guerrilla/backends"
|
|
|
)
|
|
|
|
|
|
const (
|
|
@@ -281,12 +282,14 @@ func (server *server) handleClient(client *client) {
|
|
|
server.clientPool.GetActiveClientsCount(), time.Now().Format(time.RFC3339), runtime.NumGoroutine())
|
|
|
|
|
|
helo := fmt.Sprintf("250 %s Hello", sc.Hostname)
|
|
|
- ehlo := fmt.Sprintf("250-%s Hello", sc.Hostname)
|
|
|
+ // ehlo is a multi-line reply and need additional \r\n at the end
|
|
|
+ ehlo := fmt.Sprintf("250-%s Hello\r\n", sc.Hostname)
|
|
|
|
|
|
// Extended feature advertisements
|
|
|
messageSize := fmt.Sprintf("250-SIZE %d\r\n", sc.MaxSize)
|
|
|
pipelining := "250-PIPELINING\r\n"
|
|
|
advertiseTLS := "250-STARTTLS\r\n"
|
|
|
+ // the last line doesn't need \r\n since string will be printed as a new line
|
|
|
help := "250 HELP"
|
|
|
|
|
|
if sc.TLSAlwaysOn {
|