maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# Amazon S3
 2
 3storage.blob.s3 module stores messages bodies in a bucket on S3-compatible storage.
 4
 5```
 6storage.blob.s3 {
 7    endpoint play.min.io
 8    secure yes
 9    access_key "Q3AM3UQ867SPQQA43P2F"
10    secret_key "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
11    bucket maddy-test
12
13    # optional
14    region eu-central-1
15    object_prefix maddy/
16    creds access_key
17}
18```
19
20Example:
21
22```
23storage.imapsql local_mailboxes {
24    ...
25    msg_store s3 {
26        endpoint s3.amazonaws.com
27        access_key "..."
28        secret_key "..."
29        bucket maddy-messages
30        region us-west-2
31        creds access_key
32    }
33}
34```
35
36## Configuration directives
37
38### endpoint _address:port_
39
40**Required**.
41
42Root S3 endpoint. e.g. `s3.amazonaws.com`
43
44---
45
46### secure _boolean_
47Default: `yes`
48
49Whether TLS should be used.
50
51---
52
53### access_key _string_<br>secret_key _string_
54
55**Required**.
56
57Static S3 credentials.
58
59---
60
61### bucket _name_
62
63**Required**.
64
65S3 bucket name. The bucket must exist and
66be read-writable.
67
68---
69
70### region _string_
71Default: not set
72
73S3 bucket location. May be called "endpoint" in some manuals.
74
75---
76
77### object_prefix _string_
78Default: empty string
79
80String to add to all keys stored by maddy.
81
82Can be useful when S3 is used as a file system.
83
84---
85
86### creds `access_key` | `file_minio` | `file_aws` | `iam`
87Default: `access_key`
88
89Credentials to use for accessing the S3 Bucket.
90
91Credential Types:
92
93 - `access_key`: use AWS access key and secret access key 
94 - `file_minio`: use credentials for Minio present at ~/.mc/config.json
95 - `file_aws`: use credentials for AWS S3 present at ~/.aws/credentials
96 - `iam`: use AWS IAM instance profile for credentials.
97
98By default, access_key is used with the access key and secret access key present in the config.