-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
514 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
__pycache__ | ||
logs/ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,61 @@ | ||
# mailgoose | ||
|
||
## How to run locally | ||
To run the service locally, use: | ||
Mailgoose is a web application that allows the users to check whether their SPF, DMARC and | ||
DKIM configuration is set up correctly. CERT PL uses it to run | ||
<a href="https://bezpiecznapoczta.cert.pl/">bezpiecznapoczta.cert.pl</a>, an online service | ||
that helps Polish institutions to configure their domains to decrease the probability of successful | ||
e-mail spoofing. | ||
|
||
``` | ||
cp env.example .env | ||
# Please review the file and set the configuration variables as needed, | ||
# especially APP_DOMAIN - the domain you will serve the application on. | ||
# | ||
# You may provide additional settings in this file, e.g. SSL certificate | ||
# settings: SSL_PRIVATE_KEY_PATH and SSL_CERTIFICATE_PATH. | ||
docker compose up --build | ||
``` | ||
|
||
The application will listen on http://127.0.0.1:8000 | ||
## [Quick Start 🔨](https://mailgoose.readthedocs.io/en/latest/quick-start.html) | [Docs 📚](https://mailgoose.readthedocs.io/en/latest/) | ||
|
||
## How to deploy to production | ||
Before deploying the system using the configuration in `docker-compose.yml` remember to: | ||
## Features | ||
For an up-to-date list of features, please refer to [the documentation](https://mailgoose.readthedocs.io/en/latest/features.html). | ||
|
||
- change the database password to a more secure one, | ||
- use Redis password, | ||
- consider whether you want to launch a database/Redis instance inside a container (instead | ||
of e.g. attaching to your own PostgreSQL cluster), | ||
- check whether you want to use Google nameservers. | ||
## Screenshots | ||
![Check results](.github/screenshots/check_results.png) | ||
|
||
Instead of copying `docker-compose.yml`, you may override the configuration using the | ||
`docker compose -f docker-compose.yml -f docker-compose.override.yml` syntax. | ||
## Development | ||
|
||
## How to change the layout | ||
If you want to change the main layout template (e.g. to provide additional scripts or your own | ||
custom navbar with logo), mount a different file using Docker to `/app/templates/custom_layout.html`. | ||
Refer to `app/templates/base.html` to learn what block you can fill. | ||
### Tests | ||
To run the tests, use: | ||
|
||
You can also customize the root page (/) of the system by providing your own file that will | ||
replace `/app/templates/custom_root_layout.html`. | ||
``` | ||
./scripts/test | ||
``` | ||
|
||
By replacing `/app/templates/custom_failed_check_result_hints.html` you may provide your own | ||
text that will be displayed if the e-mail sender verification mechanisms checks fail. | ||
### Code formatting | ||
Mailgoose uses `pre-commit` to run linters and format the code. | ||
`pre-commit` is executed on CI to verify that the code is formatted properly. | ||
|
||
At CERT PL we use a separate `docker-compose.yml` file with additional configuration | ||
specific to our instance (https://bezpiecznapoczta.cert.pl/). Instead of copying | ||
`docker-compose.yml`, we override the configuration using the | ||
`docker compose -f docker-compose.yml -f docker-compose.override.yml` syntax. | ||
To run it locally, use: | ||
|
||
## How to use the HTTP API | ||
``` | ||
pre-commit run --all-files | ||
``` | ||
|
||
To check a domain using a HTTP API, use: | ||
To setup `pre-commit` so that it runs before each commit, use: | ||
|
||
``` | ||
curl -X POST http://127.0.0.1:8000/api/v1/check-domain?domain=example.com | ||
pre-commit install | ||
``` | ||
|
||
## How to run the tests | ||
To run the tests, use: | ||
### Building the docs | ||
|
||
To build the documentation, use: | ||
|
||
``` | ||
./script/test | ||
cd docs | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
pip install -r requirements.txt | ||
make html | ||
``` | ||
|
||
## Contributing | ||
Contributions are welcome! We will appreciate both ideas for improvements (added as | ||
[GitHub issues](https://github.com/CERT-Polska/mailgoose)) as well as pull requests | ||
with new features or code improvements. | ||
|
||
However obvious it may seem we kindly remind you that by contributing to mailgoose | ||
you agree that the BSD 3-Clause License shall apply to your input automatically, | ||
without the need for any additional declarations to be made. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.