diff --git a/README.md b/README.md index bc48287b..fb5f0c21 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,8 @@ http://jsonlint.com/# Releases ========================================================= +1.5.1 - 4nd Nov 2016 +- Small optimizations to the way email is saved 1.5 - 2nd Nov 2016 - Fixed a DoS vulnerability, stop reading after an input limit is reached diff --git a/goguerrilla.go b/goguerrilla.go index 9af0394e..950b7886 100644 --- a/goguerrilla.go +++ b/goguerrilla.go @@ -64,7 +64,7 @@ func initialise() { return } -func runServer(sConfig ServerConfig) { +func runServer(sConfig ServerConfig) (err error) { server := SmtpdServer{Config: sConfig, sem: make(chan int, sConfig.Max_clients)} // setup logging @@ -92,6 +92,7 @@ func runServer(sConfig ServerConfig) { listener, err := net.Listen("tcp", sConfig.Listen_interface) if err != nil { server.logln(2, fmt.Sprintf("Cannot listen on port, %v", err)) + return err } else { server.logln(1, fmt.Sprintf("Listening on tcp %s", sConfig.Listen_interface)) }