Fix output for "-version" to not contain unneccessary noise

This commit is contained in:
Bernhard Froehlich
2022-05-23 15:07:21 +00:00
parent 44560c9a0c
commit e3ba45ede2
2 changed files with 6 additions and 6 deletions

View File

@@ -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!")
}