mirror of https://github.com/gophish/gophish
Added --disable-mailer flag to prevent starting the built-in mailer. Fixes #935
parent
3d58d8362e
commit
1426376aa5
|
@ -49,7 +49,8 @@ import (
|
||||||
var (
|
var (
|
||||||
Logger = log.New(os.Stdout, " ", log.Ldate|log.Ltime|log.Lshortfile)
|
Logger = log.New(os.Stdout, " ", log.Ldate|log.Ltime|log.Lshortfile)
|
||||||
|
|
||||||
configPath = kingpin.Flag("config", "Location of config.json.").Default("./config.json").String()
|
configPath = kingpin.Flag("config", "Location of config.json.").Default("./config.json").String()
|
||||||
|
disableMailer = kingpin.Flag("disable-mailer", "Disable the mailer (for use with multi-system deployments)").Bool()
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -70,7 +71,11 @@ func main() {
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
go mailer.Mailer.Start(ctx)
|
|
||||||
|
// Provide the option to disable the built-in mailer
|
||||||
|
if !*disableMailer {
|
||||||
|
go mailer.Mailer.Start(ctx)
|
||||||
|
}
|
||||||
// Setup the global variables and settings
|
// Setup the global variables and settings
|
||||||
err = models.Setup()
|
err = models.Setup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue