mirror of
https://github.com/chylex/SMTP-Relay.git
synced 2025-04-09 08:15:44 +02:00
Fix output for "-version" to not contain unneccessary noise
This commit is contained in:
parent
44560c9a0c
commit
e3ba45ede2
@ -4,6 +4,7 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
@ -188,6 +189,11 @@ func ConfigLoad() {
|
||||
// Set up logging as soon as possible
|
||||
setupLogger()
|
||||
|
||||
if *versionInfo {
|
||||
fmt.Printf("smtprelay/%s (%s)\n", appVersion, buildTime)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if *remotesStr == "" && *command == "" {
|
||||
log.Warn("no remotes or command set; mail will not be forwarded!")
|
||||
}
|
||||
|
6
main.go
6
main.go
@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/textproto"
|
||||
"os"
|
||||
@ -282,11 +281,6 @@ func getTLSConfig() *tls.Config {
|
||||
func main() {
|
||||
ConfigLoad()
|
||||
|
||||
if *versionInfo {
|
||||
fmt.Printf("smtprelay/%s (%s)\n", appVersion, buildTime)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
log.WithField("version", appVersion).
|
||||
Debug("starting smtprelay")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user