Skip to content

Commit 4ad9cb5

Browse files
authored
Merge pull request #568 from drdaeman/proxy-protocol
Proxy protocol support for SMTP and IMAP
2 parents c102d62 + 3c4fe10 commit 4ad9cb5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1831
-659
lines changed

.github/workflows/cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
restore-keys: ${{ runner.os }}-go-
2525
- uses: actions/setup-go@v2
2626
with:
27-
go-version: 1.17.11
27+
go-version: 1.18.9
2828
- name: "Verify build.sh"
2929
run: |
3030
./build.sh

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ _testmain.go
2222

2323
# Compiled binaries
2424
cmd/maddy/maddy
25-
cmd/maddyctl/maddyctl
2625
cmd/maddy-*-helper/maddy-*-helper
2726
/maddy
28-
/maddyctl
2927

3028
# Man pages
3129
docs/man/*.1

.mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ nav:
6060
- reference/table/sql_query.md
6161
- reference/table/chain.md
6262
- reference/table/email_localpart.md
63+
- reference/table/email_with_domains.md
6364
- reference/table/auth.md
6465
- Authentication providers:
6566
- reference/auth/pass_table.md
@@ -69,6 +70,7 @@ nav:
6970
- reference/auth/ldap.md
7071
- reference/auth/dovecot_sasl.md
7172
- reference/auth/plain_separate.md
73+
- reference/auth/netauth.md
7274
- reference/config-syntax.md
7375
- Integration with software:
7476
- third-party/dovecot.md

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.6.2
1+
0.7.0

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17-alpine AS build-env
1+
FROM golang:1.18-alpine AS build-env
22

33
RUN set -ex && \
44
apk upgrade --no-cache --available && \
@@ -14,15 +14,15 @@ RUN mkdir -p /pkg/data && \
1414
cp maddy.conf.docker /pkg/data/maddy.conf && \
1515
./build.sh --builddir /tmp --destdir /pkg/ --tags docker build install
1616

17-
FROM alpine:3.16.0
17+
FROM alpine:3.17.0
1818
LABEL maintainer="fox.cpp@disroot.org"
1919
LABEL org.opencontainers.image.source=https://github.com/foxcpp/maddy
2020

2121
RUN set -ex && \
2222
apk upgrade --no-cache --available && \
2323
apk --no-cache add ca-certificates
2424
COPY --from=build-env /pkg/data/maddy.conf /data/maddy.conf
25-
COPY --from=build-env /pkg/usr/local/bin/maddy /pkg/usr/local/bin/maddyctl /bin/
25+
COPY --from=build-env /pkg/usr/local/bin/maddy /bin/
2626

2727
EXPOSE 25 143 993 587 465
2828
VOLUME ["/data"]

contrib/kubernetes/chart/files/maddy.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## maddy 0.3 - default configuration file (2020-05-31)
22
# Suitable for small-scale deployments. Uses its own format for local users DB,
3-
# should be managed via maddyctl utility.
3+
# should be managed via maddy subcommands.
44
#
55
# See tutorials at https://foxcpp.dev/maddy for guidance on typical
66
# configuration changes.
@@ -28,7 +28,7 @@ tls file /etc/maddy/certs/fullchain.pem /etc/maddy/certs/privkey.pem
2828
# PAM, /etc/shadow file).
2929
#
3030
# If table module supports it (sql_table does) - credentials can be managed
31-
# using 'maddyctl creds' command.
31+
# using 'maddy creds' command.
3232

3333
auth.pass_table local_authdb {
3434
table sql_table {
@@ -43,7 +43,7 @@ auth.pass_table local_authdb {
4343
# also by SMTP & Submission endpoints for delivery of local messages.
4444
#
4545
# IMAP accounts, mailboxes and all message metadata can be inspected using
46-
# imap-* subcommands of maddyctl utility.
46+
# imap-* subcommands of maddy.
4747

4848
storage.imapsql local_mailboxes {
4949
driver sqlite3

dist/apparmor/dev.foxcpp.maddyctl

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/docker.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Official Docker image is available from Docker Hub.
55
It expects configuration file to be available at /data/maddy.conf.
66

77
If /data is a Docker volume, then default configuration will be placed there
8-
automatically. If it is used, then MADDY_HOSTNAME, MADDY_DOMAIN environment
8+
automatically. If it is used, then MADDY_HOSTNAME, MADDY_DOMAIN environment
99
variables control the host name and primary domain for the server. TLS
1010
certificate should be placed in /data/tls/fullchain.pem, private key in
1111
/data/tls/privkey.pem
@@ -15,8 +15,8 @@ DKIM keys are generated in /data/dkim_keys directory.
1515
## Image tags
1616

1717
- `latest` - A latest stable release. May contain breaking changes.
18-
- `X.Y` - A specific feature branch, it is recommended to use these tags to
19-
receive bugfixes without the risk of feature-related regressions or breaking
18+
- `X.Y` - A specific feature branch, it is recommended to use these tags to
19+
receive bugfixes without the risk of feature-related regressions or breaking
2020
changes.
2121
- `X.Y.Z` - A specific stable release
2222

@@ -30,8 +30,8 @@ All standard ports, as described in maddy docs.
3030

3131
## Volumes
3232

33-
`/data` - maddy state directory. Databases, queues, etc are stored here. You
34-
might want to mount a named volume there. The main configuration file is stored
33+
`/data` - maddy state directory. Databases, queues, etc are stored here. You
34+
might want to mount a named volume there. The main configuration file is stored
3535
here too (`/data/maddy.conf`).
3636

3737
## Management utility
@@ -47,7 +47,7 @@ docker run --rm -it -v maddydata:/data foxcpp/maddy:0.6.0 imap-acct create foxcp
4747
Use the same image version as the running server. Things may break badly
4848
otherwise.
4949

50-
Note that, if you modify messages using maddyctl while the server is running -
50+
Note that, if you modify messages using maddy subcommands while the server is running -
5151
you must ensure that /tmp from the server is accessible for the management
5252
command. One way to it is to run it using `docker exec` instead of `docker run`:
5353
```
@@ -70,6 +70,6 @@ docker run \
7070
foxcpp/maddy:0.6
7171
```
7272

73-
It will fail on first startup. Copy TLS certificate to /data/tls/fullchain.pem
74-
and key to /data/tls/privkey.pem. Run the server again. Finish DNS configuration
75-
(DKIM keys, etc) as described in [tutorials/setting-up/](tutorials/setting-up/).
73+
It will fail on first startup. Copy TLS certificate to /data/tls/fullchain.pem
74+
and key to /data/tls/privkey.pem. Run the server again. Finish DNS configuration
75+
(DKIM keys, etc) as described in [tutorials/setting-up/](tutorials/setting-up/).

docs/faq.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Unfortunately, GMail policies are opaque so we cannot tell why this happens.
66

77
Verify that you have a rDNS record set for the IP used
8-
by sender server. Also some IPs may just happen to
8+
by sender server. Also some IPs may just happen to
99
have bad reputation - check it with various DNSBLs. In this
1010
case you do not have much of a choice but to replace it.
1111

@@ -21,19 +21,19 @@ all outbound messages via a "smart-host".
2121

2222
## What is resource usage of maddy?
2323

24-
For a small personal server, you do not need much more than a
24+
For a small personal server, you do not need much more than a
2525
single 1 GiB of RAM and disk space.
2626

2727
## How to setup a catchall address?
2828

2929
https://github.com/foxcpp/maddy/issues/243#issuecomment-655694512
3030

31-
## maddyctl prints a "permission denied" error
31+
## maddy command prints a "permission denied" error
3232

33-
Run maddyctl under the same user as maddy itself.
33+
Run maddy command under the same user as maddy itself.
3434
E.g.
35-
```
36-
sudo -u maddy maddyctl creds ...
35+
```
36+
sudo -u maddy maddy creds ...
3737
```
3838

3939
## How maddy compares to MailCow or Mail-In-The-Box?
@@ -116,4 +116,4 @@ of bugs in one component.
116116

117117
Besides, you are not required to use a single process, it is easy to launch
118118
maddy with a non-default configuration path and connect multiple instances
119-
together using off-the-shelf protocols.
119+
together using off-the-shelf protocols.

0 commit comments

Comments
 (0)