mirror of https://github.com/gophish/gophish
Added --disable-mailer flag to prevent starting the built-in mailer. Fixes #935
parent
3d58d8362e
commit
1426376aa5
|
@ -50,6 +50,7 @@ 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()
|
||||||
|
|
||||||
|
// Provide the option to disable the built-in mailer
|
||||||
|
if !*disableMailer {
|
||||||
go mailer.Mailer.Start(ctx)
|
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