Skip to content

Commit

Permalink
update authentik readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mahula committed Jul 2, 2024
1 parent 84656c7 commit f79546c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions authentik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit f79546c

Please sign in to comment.