Skip to content

Commit 9a25e7e

Browse files
committed
Add DOMAIN_VERIFICATION and USER_MANAGEMENT envs
1 parent 4592b1b commit 9a25e7e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ That will be moved to `${MAILBOXES_WHEN_DONE_MOVE_TO}` or `${MAILBOXES_WHEN_FAIL
2323
- `IMAP_USER` (The IMAP user)
2424
- `IMAP_PASSWORD` (The IMAP password)
2525
- `UI_PASSWORD` (The web UI password)
26+
- `USER_MANAGEMENT` optional: (A boolean to enable managing users from the Web UI)
27+
- `DOMAIN_VERIFICATION` optional: (Domain ownership verification method for users who are authorized to add domains. Valid values: `dns` and `none`.)
2628
- `MAILBOX_NAME` (The mailbox folder name where reports are stored to be ingested)
2729
- `MAILBOXES_WHEN_DONE_MOVE_TO` (The mailbox folder name where reports are stored when they passed ingestion)
2830
- `MAILBOXES_WHEN_FAILED_MOVE_TO` (The mailbox folder name where reports are stored when they failed ingestion)
@@ -43,8 +45,6 @@ See: [cron setup from the upstream image](https://github.com/webdevops/Dockerfil
4345
## Docker compose
4446

4547
```yml
46-
version: "2.3"
47-
4848
services:
4949

5050
dmarc-srg:

docker/config.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,13 @@
114114
'password' => getenv('UI_PASSWORD'),
115115
];
116116

117+
$domainVerification = getenv('DOMAIN_VERIFICATION');
118+
117119
$users = [
118120
// Enables the use of multiple users in the web interface. The authentication dialog will ask for a username and
119121
// password. Use `admin` as the username for the above password. To add new users, use Administration -> Users.
120122
// The default value is false.
121-
'user_management' => false,
123+
'user_management' => (bool) getenv('USER_MANAGEMENT'),
122124

123125
/**
124126
* Domain ownership verification method for users who are authorized to add domains.
@@ -127,7 +129,7 @@
127129
* 'dns' - Verification by adding DNS TXT record like dmarcsrg-verification=...
128130
* The default value is 'none'.
129131
*/
130-
'domain_verification' => 'none'
132+
'domain_verification' => in_array($domainVerification, ['none', 'dns']) ? $domainVerification : 'none',
131133
];
132134

133135
//

0 commit comments

Comments
 (0)