Skip to content

Commit 795b023

Browse files
committed
docs: enhance documentation with mailserver-admin configuration details
1 parent 6363db3 commit 795b023

9 files changed

Lines changed: 332 additions & 4 deletions

File tree

.mkdocs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ nav:
2020
- upgrade.md
2121
- Configuration:
2222
- configuration/environment-variables.md
23+
- configuration/mailserver-admin.md
2324
- configuration/dns-configuration.md
2425
- configuration/external-mysql.md
2526
- configuration/relayhost.md
@@ -29,13 +30,15 @@ nav:
2930
- configuration/roundcube.md
3031
- configuration/tls.md
3132
- Administration:
33+
- administration/login.md
3234
- administration/dashboard.md
3335
- administration/manage-domains.md
3436
- administration/manage-users.md
3537
- administration/manage-aliases.md
3638
- administration/manage-fetchmail.md
3739
- administration/dkim-signing.md
3840
- administration/dns-validation-wizard.md
41+
- administration/user-roles.md
3942
- Recipes:
4043
- Docker:
4144
- Traefik Reverse Proxy: https://github.com/jeboehm/docker-mailserver/tree/main/docs/example-configs/compose/traefik-reverse-proxy
@@ -44,4 +47,5 @@ nav:
4447
- Development:
4548
- development/architecture.md
4649
- development/development.md
50+
- development/mailserver-admin.md
4751
- Issues: https://github.com/jeboehm/docker-mailserver/issues

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# docker-mailserver
22

3-
![Logo](/docs/logo/logo.png?raw=true)
3+
![Logo](/docs/logo/logo.png)
44

5-
`docker-mailserver` is inspired by the renowned [ISPMail guide](https://workaround.org/ispmail/).
5+
`docker-mailserver` is inspired by the renowned [ISPMail guide](https://workaround.org/).
66
This project lets you run your own email services, giving you independence from large providers. It is a secure, customizable, and feature-rich solution for managing your email infrastructure.
77

88
Container images are built on [Alpine Linux](https://alpinelinux.org) or vendor base images and are kept lightweight.
99

10-
[![Build & Tests](https://github.com/jeboehm/docker-mailserver/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/jeboehm/docker-mailserver/actions/workflows/build.yml)
10+
[![Build & Tests](https://github.com/jeboehm/docker-mailserver/actions/workflows/build.yml/badge.svg)](https://github.com/jeboehm/docker-mailserver/actions/workflows/build.yml)
11+
[![Validate Manifests](https://github.com/jeboehm/docker-mailserver/actions/workflows/test-yaml-schema.yml/badge.svg)](https://github.com/jeboehm/docker-mailserver/actions/workflows/test-yaml-schema.yml)
12+
[![Release](https://github.com/jeboehm/docker-mailserver/actions/workflows/release.yml/badge.svg)](https://github.com/jeboehm/docker-mailserver/actions/workflows/release.yml)
13+
[![Documentation](https://github.com/jeboehm/docker-mailserver/actions/workflows/docs.yml/badge.svg)](https://github.com/jeboehm/docker-mailserver/actions/workflows/docs.yml)
1114

1215
## 📚 Documentation
1316

@@ -57,6 +60,10 @@ For detailed installation instructions, see the [Installation Guide](https://jeb
5760

5861
![DKIM setup](docs/images/admin/dkim_edit.png)
5962

63+
### DNS Validation Wizard
64+
65+
![DNS Validation Wizard](docs/images/admin/dns_validation_wizard.png)
66+
6067
## Links
6168

6269
- [Documentation](https://jeboehm.github.io/docker-mailserver/) - Complete documentation and guides

docs/administration/login.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Login
2+
3+
The login page provides authentication to access the `mailserver-admin` interface. Users can authenticate using either regular email address and password credentials and OAuth2, depending on the configuration.
4+
5+
![Login](../images/admin/login.png)
6+
7+
## Authentication Methods
8+
9+
### Local Authentication
10+
11+
By default, users authenticate using their email address and password configured in the mailserver.
12+
13+
### OAuth2 Authentication
14+
15+
OAuth2 authentication can be enabled to allow users to log in using an external identity provider. When OAuth2 is enabled, a login button appears on the login page. Currently, this is only useful for granting admin rights to users.
16+
17+
For OAuth2 configuration options, see [mailserver-admin configuration](../configuration/mailserver-admin.md#oauth2).

docs/administration/manage-users.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Users are email accounts associated with a specific domain. Each user has a uniq
1111
- **Admin**: Can manage users across all domains
1212
- **Domain Admin**: Can manage users within their assigned domain only
1313
- **User**: Cannot manage other users, only their own account settings
14+
See [User Roles](user-roles.md) for more information.
1415

1516
## User Operations
1617

@@ -87,10 +88,12 @@ When a user is set to send only, they can only send emails. They cannot receive
8788
### Admin
8889

8990
When a user is set to admin, they can manage other users and domains.
91+
See [User Roles](user-roles.md) for more information.
9092

9193
### Domain Admin
9294

9395
When a user is set to domain admin, they can manage users and aliases within their assigned domain.
96+
See [User Roles](user-roles.md) for more information.
9497

9598
## User Access
9699

docs/administration/user-roles.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# User Roles
2+
3+
In `mailserver-admin`, there are three distinct user roles, each with different levels of access and permissions:
4+
5+
1. **Admin**
6+
- **Permissions**: Can perform all actions within the application.
7+
- **Capabilities**:
8+
- Manage all mail domains, users, aliases, and DKIM settings.
9+
- Full access to all features and configurations.
10+
11+
2. **Domain Admin**
12+
- **Permissions**: Limited to managing users, aliases, and fetchmail accounts within their own domain.
13+
- **Capabilities**:
14+
- Create, update, and remove users within their domain.
15+
- Define and manage mail aliases within their domain.
16+
- Configure and manage fetchmail accounts within their domain.
17+
- **Restrictions**:
18+
- Cannot add or edit new domains.
19+
- Cannot manage DKIM settings for any domain.
20+
21+
3. **User**
22+
- **Permissions**: Limited to managing their own fetchmail accounts.
23+
- **Capabilities**:
24+
- Login to the application.
25+
- Configure and manage their personal fetchmail accounts.
26+
- **Restrictions**:
27+
- Cannot manage users, aliases, or domains.
28+
- No access to DKIM settings or domain configurations.

docs/configuration/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ when you use Kubernetes or decide to rename services somehow.
8585

8686
### mailserver-admin Configuration
8787

88-
See [mailserver-admin](https://github.com/jeboehm/mailserver-admin?tab=readme-ov-file#environment-variables) for more information.
88+
See [mailserver-admin](mailserver-admin.md) for more information.
8989

9090
### PHP Configuration
9191

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# mailserver-admin configuration
2+
3+
## OAuth2
4+
5+
To use OAuth2, you need to create a new OAuth2 client in your OAuth2 provider. The redirect URI should be
6+
`https://example.com/login/check-oauth`. The client ID and client secret should be added to the `.env` file.
7+
8+
Depending on your needs, you can configure `mailserver-admin` to give admin rights to a user by testing for a specific group in the groups
9+
field of the OAuth user information. Set the name of your administrator group to the `OAUTH_ADMIN_GROUP` variable in the `.env` file. If you
10+
leave `OAUTH_ADMIN_GROUP` empty, all authenticated users will have admin rights. You must make sure to handle the login permissions in your
11+
OAuth2 provider.
12+
13+
### OAuth2 configuration example
14+
15+
```bash
16+
OAUTH_ENABLED=true
17+
OAUTH_CLIENT_ID=xxxxx-xxxx-xxxx-xxxx-xxxxxxx
18+
OAUTH_CLIENT_SECRET=xxxxxxxxxxxxx
19+
OAUTH_CLIENT_SCOPES="email profile groups"
20+
OAUTH_AUTHORIZATION_URL=https://id.example.com/authorize
21+
OAUTH_ACCESS_TOKEN_URL=https://id.example.com/api/oidc/token
22+
OAUTH_INFOS_URL=https://id.example.com/api/oidc/userinfo
23+
OAUTH_BUTTON_TEXT="Login with OIDC"
24+
OAUTH_ADMIN_GROUP=admin
25+
OAUTH_PATHS_IDENTIFIER=sub
26+
```
27+
28+
## Environment variables
29+
30+
The following environment variables can be set in the `.env` file or in the environment:
31+
32+
### General
33+
34+
- `APP_ENV`: The environment the application is running in. Default: `prod`
35+
- `APP_SECRET`: A secret key used by Symfony for various purposes (e.g., CSRF tokens). Default: `randomly generated`.
36+
- `CSRF_ENABLED`: Whether CSRF protection is enabled. Default: `true`.
37+
- `TRUSTED_PROXIES`: A list of trusted proxy IP addresses.
38+
39+
### Database
40+
41+
- `MYSQL_USER`: The MySQL database user.
42+
- `MYSQL_PASSWORD`: The MySQL database password.
43+
- `MYSQL_HOST`: The MySQL database host.
44+
- `MYSQL_DATABASE`: The MySQL database name.
45+
- `REDIS_HOST`: The Redis server host.
46+
- `REDIS_PORT`: The Redis server port.
47+
- `REDIS_PASSWORD`: The Redis server password.
48+
49+
### OAuth2
50+
51+
- `OAUTH_ENABLED`: Whether OAuth2 is enabled. Default: `false`.
52+
- `OAUTH_CLIENT_ID`: The client ID for the OAuth2 provider.
53+
- `OAUTH_CLIENT_SECRET`: The client secret for the OAuth2 provider.
54+
- `OAUTH_CLIENT_SCOPES`: The scopes requested from the OAuth2 provider. Default: `"email profile groups"`.
55+
- `OAUTH_AUTHORIZATION_URL`: The authorization URL for the OAuth2 provider.
56+
- `OAUTH_ACCESS_TOKEN_URL`: The access token URL for the OAuth2 provider.
57+
- `OAUTH_INFOS_URL`: The user information URL for the OAuth2 provider.
58+
- `OAUTH_ADMIN_GROUP`: The name of the administrator group in the OAuth2 provider.
59+
- `OAUTH_BUTTON_TEXT`: The text displayed on the OAuth2 login button. Default: `"Login with OIDC"`.

0 commit comments

Comments
 (0)