mirror of
https://github.com/decke/smtprelay.git
synced 2025-12-25 16:02:31 -07:00
More formatting fixes
This commit is contained in:
16
main.go
16
main.go
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user