More formatting fixes

This commit is contained in:
Bernhard Froehlich
2018-12-20 11:13:05 +00:00
parent 6427f0ec23
commit dbe4c3bc50

16
main.go
View File

@@ -28,7 +28,7 @@ var (
localCert = flag.String("local_cert", "", "SSL certificate for STARTTLS/TLS") localCert = flag.String("local_cert", "", "SSL certificate for STARTTLS/TLS")
localKey = flag.String("local_key", "", "SSL private key for STARTTLS/TLS") localKey = flag.String("local_key", "", "SSL private key for STARTTLS/TLS")
localForceTLS = flag.Bool("local_forcetls", false, "Force STARTTLS (needs local_cert and local_key)") localForceTLS = flag.Bool("local_forcetls", false, "Force STARTTLS (needs local_cert and local_key)")
allowedNets = flag.String("allowed_nets", "127.0.0.1/8 ::1/128", "Networks allowed to send mails") allowedNets = flag.String("allowed_nets", "127.0.0.1/8 ::1/128", "Networks allowed to send mails")
remoteHost = flag.String("remote_host", "smtp.gmail.com:587", "Outgoing SMTP server") remoteHost = flag.String("remote_host", "smtp.gmail.com:587", "Outgoing SMTP server")
remoteUser = flag.String("remote_user", "", "Username for authentication on outgoing SMTP server") remoteUser = flag.String("remote_user", "", "Username for authentication on outgoing SMTP server")
remotePass = flag.String("remote_pass", "", "Password for authentication on outgoing SMTP server") remotePass = flag.String("remote_pass", "", "Password for authentication on outgoing SMTP server")
@@ -112,13 +112,13 @@ func main() {
listener := listeners[i] listener := listeners[i]
server := &smtpd.Server{ server := &smtpd.Server{
Hostname: *hostName, Hostname: *hostName,
WelcomeMessage: *welcomeMsg, WelcomeMessage: *welcomeMsg,
ConnectionChecker: connectionChecker, ConnectionChecker: connectionChecker,
SenderChecker: senderChecker, SenderChecker: senderChecker,
RecipientChecker: recipientChecker, RecipientChecker: recipientChecker,
Handler: mailHandler, Handler: mailHandler,
ProtocolLogger: log.New(logwriter, "INBOUND: ", log.Lshortfile), ProtocolLogger: log.New(logwriter, "INBOUND: ", log.Lshortfile),
} }
if strings.Index(listeners[i], "://") == -1 { if strings.Index(listeners[i], "://") == -1 {