This commit significantly improves the performance of campaign and group creation by changing database access to use transactions.
It should also make things more consistent with campaign creation. Specifically, this will ensure that the entire campaign gets created before emails start sending, while I anticipate this will fix#1643, #1080, (possibly) #1677, and #1552.
* Refactoring servers to support custom workers and graceful shutdown.
* Refactoring workers to support custom mailers.
* Refactoring mailer to be an interface, with proper instances instead of a single global instance
* Cleaning up a few things. Locking maillogs for campaigns set to launch immediately to prevent a race condition.
* Cleaning up API middleware to be simpler
* Moving template parameters to separate struct
* Changed LoadConfig to return config object
* Cleaned up some error handling, removing uninitialized global error in models package
* Changed static file serving to use the unindexed package
This builds on the work from @c-f in #1090 to fully add support for "timed" campaigns, in which the emails are spaced apart as opposed to all being sent at once.
Added the modified_date field to results so it's easy to keep track of the last results that were modified without having to parse every event. Updated the tests to reflect the changes.
Adds the capability to report phishing campaigns using an email client extension.
**Note: Gophish does not currently provide an email client extension out of the box. This is simply a mechanism to let existing email client add-ons send report status information to Gophish, and have that information reflected in the dashboard.**
Now supports autocomplete for modal typeahead. Fixes#40
Users can now specify landing pages in campaigns. Fixes#39
Implemented "Email Opened" status. Fixes#38
Cleaned up flashes - fixes#13
Added specified errors - more to come soon
Added Campaign validation
Added Group validation
Cleaned up the way angular errors are handled. Will double check, but for the most part fixes#11
Results are now shown on the webui with most recent shown first
Added comments, additional cleanup, etc.
Additional cleanup, documentation
Changed return values for /api/templates and /api/pages to return empty array [] if no results (like /api/campaigns was already doing)