mirror of
https://github.com/axllent/mailpit.git
synced 2025-07-17 01:32:33 +02:00
@ -90,11 +90,13 @@ func Listen() {
|
|||||||
// Mark the application here as ready
|
// Mark the application here as ready
|
||||||
isReady.Store(true)
|
isReady.Store(true)
|
||||||
|
|
||||||
|
logger.Log().Infof("[http] starting on %s", config.HTTPListen)
|
||||||
|
|
||||||
if config.UITLSCert != "" && config.UITLSKey != "" {
|
if config.UITLSCert != "" && config.UITLSKey != "" {
|
||||||
logger.Log().Infof("[http] starting secure server on https://%s%s", logger.CleanHTTPIP(config.HTTPListen), config.Webroot)
|
logger.Log().Infof("[http] accessible via https://%s%s", logger.CleanHTTPIP(config.HTTPListen), config.Webroot)
|
||||||
logger.Log().Fatal(http.ListenAndServeTLS(config.HTTPListen, config.UITLSCert, config.UITLSKey, nil))
|
logger.Log().Fatal(http.ListenAndServeTLS(config.HTTPListen, config.UITLSCert, config.UITLSKey, nil))
|
||||||
} else {
|
} else {
|
||||||
logger.Log().Infof("[http] starting server on http://%s%s", logger.CleanHTTPIP(config.HTTPListen), config.Webroot)
|
logger.Log().Infof("[http] accessible via http://%s%s", logger.CleanHTTPIP(config.HTTPListen), config.Webroot)
|
||||||
logger.Log().Fatal(http.ListenAndServe(config.HTTPListen, nil))
|
logger.Log().Fatal(http.ListenAndServe(config.HTTPListen, nil))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ func LoginAuth(username, password string) smtp.Auth {
|
|||||||
return &loginAuth{username, password}
|
return &loginAuth{username, password}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *loginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {
|
func (a *loginAuth) Start(_ *smtp.ServerInfo) (string, []byte, error) {
|
||||||
return "LOGIN", []byte{}, nil
|
return "LOGIN", []byte{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ func Listen() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Log().Infof("[smtpd] starting on %s", logger.CleanIP(config.SMTPListen))
|
logger.Log().Infof("[smtpd] starting on %s", config.SMTPListen)
|
||||||
|
|
||||||
return listenAndServe(config.SMTPListen, mailHandler, authHandler)
|
return listenAndServe(config.SMTPListen, mailHandler, authHandler)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user