Skip to content

Commit 798c411

Browse files
committed
Merge branch 'master' into dev
2 parents 351c44e + c67955e commit 798c411

File tree

109 files changed

+1969
-1384
lines changed

Some content is hidden

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

109 files changed

+1969
-1384
lines changed

.github/workflows/cicd.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ on:
1010
jobs:
1111
build-and-test:
1212
name: "Build and test"
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
1616
- name: "Install libpam"
17-
run: sudo apt-get install -y libpam-dev
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y libpam-dev
1820
- uses: actions/cache@v2
1921
with:
2022
path: |
@@ -24,7 +26,7 @@ jobs:
2426
restore-keys: ${{ runner.os }}-go-
2527
- uses: actions/setup-go@v2
2628
with:
27-
go-version: 1.18.9
29+
go-version: 1.19
2830
- name: "Verify build.sh"
2931
run: |
3032
./build.sh

.mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +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
63+
- reference/table/email_with_domain.md
6464
- reference/table/auth.md
6565
- Authentication providers:
6666
- reference/auth/pass_table.md

Dockerfile

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

33
RUN set -ex && \
44
apk upgrade --no-cache --available && \
@@ -14,7 +14,7 @@ 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.17.0
17+
FROM alpine:3.18.4
1818
LABEL maintainer="fox.cpp@disroot.org"
1919
LABEL org.opencontainers.image.source=https://github.com/foxcpp/maddy
2020

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ daemon with uniform configuration and minimal maintenance cost.
1515
feature-packed implementation you may want to use Dovecot instead. maddy still
1616
can handle message delivery business.
1717

18-
[![CI status](https://img.shields.io/github/workflow/status/foxcpp/maddy/Testing%20and%20release%20preparation?style=flat-square)](https://github.com/foxcpp/maddy/actions/workflows/cicd.yml)
19-
[![Issues tracker](https://img.shields.io/github/issues/foxcpp/maddy)](https://github.com/foxcpp/maddy)
18+
[![CI status](https://img.shields.io/github/actions/workflow/status/foxcpp/maddy/cicd.yml?style=flat-square)](https://github.com/foxcpp/maddy/actions/workflows/cicd.yml)
19+
[![Issues tracker](https://img.shields.io/github/issues/foxcpp/maddy?style=flat-square)](https://github.com/foxcpp/maddy)
2020

2121
* [Setup tutorial](https://maddy.email/tutorials/setting-up/)
2222
* [Documentation](https://maddy.email/)

build.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,23 @@ install() {
146146
# Attempt to install systemd units only for Linux.
147147
# Check is done using GOOS instead of uname -s to account for possible
148148
# package cross-compilation.
149-
if [ "$(go env GOOS)" = "linux" ]; then
150-
command install -m 0755 -d "${destdir}/${prefix}/lib/systemd/system/"
151-
command install -m 0644 "${builddir}"/systemd/*.service "${destdir}/${prefix}/lib/systemd/system/"
152-
fi
149+
# Though go command might be unavailable if build.sh is run
150+
# with sudo and go installation is user-specific, so fallback
151+
# to using uname -s in the end.
152+
set +e
153+
if command -v go >/dev/null 2>/dev/null; then
154+
set -e
155+
if [ "$(go env GOOS)" = "linux" ]; then
156+
command install -m 0755 -d "${destdir}/${prefix}/lib/systemd/system/"
157+
command install -m 0644 "${builddir}"/systemd/*.service "${destdir}/${prefix}/lib/systemd/system/"
158+
fi
159+
else
160+
set -e
161+
if [ "$(uname -s)" = "Linux" ]; then
162+
command install -m 0755 -d "${destdir}/${prefix}/lib/systemd/system/"
163+
command install -m 0644 "${builddir}"/systemd/*.service "${destdir}/${prefix}/lib/systemd/system/"
164+
fi
165+
fi
153166

154167
if [ -e "${builddir}"/man ]; then
155168
command install -m 0755 -d "${destdir}/${prefix}/share/man/man1/"

contrib/kubernetes/chart/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ load balancer in front of the nodes.
99

1010
## Requirement
1111

12-
In order to run maddy properly, you need to have TLS secret undet name maddy present in the cluster. If you have commercial
12+
In order to run maddy properly, you need to have TLS secret under name maddy present in the cluster. If you have commercial
1313
certificate, you can create it by the following command:
1414

1515
```sh
@@ -20,9 +20,9 @@ If you use cert-manager, just create the secret under name maddy.
2020

2121
## Replication
2222

23-
Default for this chart is 1 replica of maddy. If you try to increse this, you will probably get an error because of
23+
Default for this chart is 1 replica of maddy. If you try to increase this, you will probably get an error because of
2424
the busy ports 25, 143, 587, etc. We do not support this feature at the moment, so please use just 1 replica. Like said
25-
at the begining of this document, multiple replicas would probably require to switch do DaemonSet which would further require
25+
at the beginning of this document, multiple replicas would probably require to switch do DaemonSet which would further require
2626
to have TCP load balancer and shared storage between all replicas. This is not supported by this chart, sorry.
2727
This chart is used on one node cluster and then installation is straight forward, like described bellow, but if you have
2828
multiple node cluster, please use taints and tolerations to select the desired node. This chart supports tolerations to

dist/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Additionally, unit files apply strict sandboxing, limiting maddy permissions on
2222
the system to a bare minimum. Subset of these options makes it impossible for
2323
privileged authentication helper binaries to gain required permissions, so you
2424
may have to disable it when using system account-based authentication with
25-
maddy running as a unprivilieged user.
25+
maddy running as a unprivileged user.
2626

2727
## fail2ban configuration
2828

dist/systemd/maddy.service

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Description=maddy mail server
33
Documentation=man:maddy(1)
44
Documentation=man:maddy.conf(5)
55
Documentation=https://maddy.email
6-
After=network.target
6+
After=network-online.target
77

88
[Service]
99
Type=notify
@@ -54,8 +54,9 @@ KillSignal=SIGTERM
5454
AmbientCapabilities=CAP_NET_BIND_SERVICE
5555
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
5656

57-
# Force all files created by maddy to be only readable by it.
58-
UMask=0027
57+
# Force all files created by maddy to be only readable by it
58+
# and maddy group.
59+
UMask=0007
5960

6061
# Bump FD limitations. Even idle mail server can have a lot of FDs open (think
6162
# of idle IMAP connections, especially ones abandoned on the other end and

dist/systemd/maddy@.service

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Description=maddy mail server (using %i.conf)
33
Documentation=man:maddy(1)
44
Documentation=man:maddy.conf(5)
55
Documentation=https://maddy.email
6-
After=network.target
6+
After=network-online.target
77

88
[Service]
99
Type=notify
@@ -50,8 +50,9 @@ KillSignal=SIGTERM
5050
AmbientCapabilities=CAP_NET_BIND_SERVICE
5151
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
5252

53-
# Force all files created by maddy to be only readable by it.
54-
UMask=0027
53+
# Force all files created by maddy to be only readable by it and
54+
# maddy group.
55+
UMask=0007
5556

5657
# Bump FD limitations. Even idle mail server can have a lot of FDs open (think
5758
# of idle IMAP connections, especially ones abandoned on the other end and

docs/docker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ docker run \
7272

7373
It will fail on first startup. Copy TLS certificate to /data/tls/fullchain.pem
7474
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/).
75+
(DKIM keys, etc) as described in [tutorials/setting-up/](../tutorials/setting-up/).

0 commit comments

Comments
 (0)