-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 changed file
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,38 @@ If you want to publish changes to the database you can use the following command | |
|
||
(Note: this assumes you are not root and sets the permissions of the database files via sudo) | ||
(Note: make sure to shut down the database first before you run the script) | ||
|
||
## E-Mail testing | ||
|
||
Authentik e-mails can be checked locally via [Mailpit mailserver](https://mailpit.axllent.org/). | ||
|
||
### Prepare and start | ||
|
||
```bash | ||
# in the authentik directory | ||
# get hostname and write e-mail environment variables to .env | ||
echo -e "\n\nAUTHENTIK_EMAIL__HOST=$(hostname) | ||
AUTHENTIK_EMAIL__PORT=1025 | ||
AUTHENTIK_EMAIL__USE_TLS=false | ||
AUTHENTIK_EMAIL__USE_SSL=false | ||
AUTHENTIK_EMAIL__TIMEOUT=10 | ||
[email protected]" >> .env | ||
|
||
# start authentik and mailserver | ||
docker-compose -f docker-compose.yml -f docker-compose.test.yml up | ||
``` | ||
|
||
### Example | ||
|
||
The given setup can be tested via [Authentik's e-mail testing tool](https://github.com/goauthentik/authentik/blob/main/authentik/stages/email/management/commands/test_email.py) | ||
|
||
|
||
```bash | ||
# in the authentik directory execute the email test | ||
docker compose exec worker ak test_email [email protected] | ||
|
||
# in the browser see the Mailpit inbox | ||
<your_machine_name>:8025 | ||
# or | ||
localhost:8025 | ||
``` |