aboutsummaryrefslogtreecommitdiff
path: root/doc/src/config.md
blob: 732ecb7a16d4e027539765e4f67906d89a88117d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Configuration file

A configuration file that illustrate all the possible options,
in practise, many fields are omitted:

```toml
s3_endpoint = "s3.garage.tld"
k2v_endpoint = "k2v.garage.tld"
aws_region = "garage"

[lmtp]
bind_addr = "[::1]:2525"
hostname = "aerogramme.tld"

[imap]
bind_addr = "[::1]:993"

[login_static]
default_bucket = "aerogramme"

[login_static.user.alan]
email_addresses = [
  "alan@smith.me"
  "aln@example.com"
]
password = "$argon2id$v=19$m=4096,t=3,p=1$..."

aws_access_key_id = "GK..."
aws_secret_access_key = "c0ffee"
bucket = "aerogramme-alan"

user_secret = "s3cr3t"
alternate_user_secrets = [ "s3cr3t2" "s3cr3t3" ]

master_key = "..."
secret_key = "..."

[login_ldap]
ldap_server = "ldap.example.com"

pre_bind_on_login = true
bind_dn = "cn=admin,dc=example,dc=com"
bind_password = "s3cr3t"

search_base = "ou=users,dc=example,dc=com"
username_attr = "cn"
mail_attr = "mail"

aws_access_key_id_attr = "garage_s3_access_key"
aws_secret_access_key_attr = "garage_s3_secret_key"
user_secret_attr = "secret"
alternate_user_secrets_attr = "secret_alt"

# bucket = "aerogramme"
bucket_attr = "bucket"

```

## Global configuration options

### `s3_endpoint`

### `k2v_endpoint`

### `aws_region`

## LMTP configuration options

### `lmtp.bind_addr`

### `lmtp.hostname`

## IMAP configuration options

### `imap.bind_addr`

## Static login configuration options

### `login_static.default_bucket`

### `login_static.user.<name>.email_addresses`

### `login_static.user.<name>.password`

### `login_static.user.<name>.aws_access_key_id`

### `login_static.user.<name>.aws_secret_access_key`

### `login_static.user.<name>.bucket`

### `login_static.user.<name>.user_secret`

### `login_static.user.<name>.master_key`

### `login_static.user.<name>.secret_key`

## LDAP login configuration options

### `login_ldap.ldap_server`

### `login_ldap.pre_bind_on`

### `login_ldap.bind_dn`

### `login_ldap.bind_password`

### `login_ldap.search_base`

### `login_ldap.username_attr`

### `login_ldap.mail_attr`

### `login_ldap.aws_access_key_id_attr`

### `login_ldap.aws_secret_access_key_attr`

### `login_ldap.user_secret_attr`

### `login_ldap.alternate_user_secrets_attr`

### `login_ldap.bucket`

### `login_ldap.bucket_attr`