Stalwart Mail Server is now just Stalwart

This commit is contained in:
mdecimus 2025-05-20 09:59:54 +02:00
parent c6ef70edd2
commit 9cf2863a8e
28 changed files with 164 additions and 153 deletions

View file

@ -1,12 +1,12 @@
name: I think I found a bug name: I think I found a bug
description: File a bug report issue. If you have a question or are experiencing a problem, please start a [new discussion](https://github.com/stalwartlabs/mail-server/discussions/new?category=q-a) instead. description: File a bug report issue. If you have a question or are experiencing a problem, please start a [new discussion](https://github.com/stalwartlabs/stalwart/discussions/new?category=q-a) instead.
title: "🐛: " title: "🐛: "
labels: ["bug"] labels: ["bug"]
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Thanks for taking the time to fill out this bug report! Use this form only for reporting bugs. If you have a question or problem, please use the [Q&A discussion](https://github.com/stalwartlabs/mail-server/discussions/new?category=q-a). Thanks for taking the time to fill out this bug report! Use this form only for reporting bugs. If you have a question or problem, please use the [Q&A discussion](https://github.com/stalwartlabs/stalwart/discussions/new?category=q-a).
- type: textarea - type: textarea
id: what-happened id: what-happened
attributes: attributes:
@ -31,9 +31,9 @@ body:
label: Version label: Version
description: What version of our software are you running? description: What version of our software are you running?
options: options:
- v0.12.x
- v0.11.x - v0.11.x
- v0.10.x - v0.10.x or lower
- v0.9.x or lower
validations: validations:
required: true required: true
- type: dropdown - type: dropdown
@ -67,6 +67,7 @@ body:
- Internal - Internal
- SQL - SQL
- LDAP - LDAP
- OIDC
- type: dropdown - type: dropdown
id: os id: os
attributes: attributes:
@ -75,6 +76,7 @@ body:
- Linux - Linux
- Docker - Docker
- MacOS - MacOS
- NixOS
- FreeBSD - FreeBSD
- Windows - Windows
- type: textarea - type: textarea

View file

@ -4,7 +4,7 @@ contact_links:
url: https://stalw.art/docs/ url: https://stalw.art/docs/
about: Read the documentation, use the search bar to find answers to your questions. about: Read the documentation, use the search bar to find answers to your questions.
- name: I have a question or problem not covered in the documentation - name: I have a question or problem not covered in the documentation
url: https://github.com/stalwartlabs/mail-server/discussions/new?category=q-a url: https://github.com/stalwartlabs/stalwart/discussions/new?category=q-a
about: Open a Q&A discussion about: Open a Q&A discussion
- name: Join Stalwart's Reddit - name: Join Stalwart's Reddit
url: https://www.reddit.com/r/stalwartlabs url: https://www.reddit.com/r/stalwartlabs

View file

@ -6,7 +6,7 @@ body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Thanks for taking the time to fill out this feature request form! Use this form only for requesting new features. If you have a question or problem, please use the [Q&A discussion](https://github.com/stalwartlabs/mail-server/discussions/new?category=q-a). Thanks for taking the time to fill out this feature request form! Use this form only for requesting new features. If you have a question or problem, please use the [Q&A discussion](https://github.com/stalwartlabs/stalwart/discussions/new?category=q-a).
- type: textarea - type: textarea
id: request id: request
attributes: attributes:

View file

@ -311,10 +311,10 @@ jobs:
- name: Build - name: Build
run: | run: |
rustup target add ${{matrix.target}} rustup target add ${{matrix.target}}
cargo build --release --target ${{matrix.target}} -p mail-server --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise"
cargo build --release --target ${{matrix.target}} -p stalwart-cli cargo build --release --target ${{matrix.target}} -p stalwart-cli
mkdir -p artifacts mkdir -p artifacts
mv ./target/${{matrix.target}}/release/stalwart-mail.exe ./artifacts/stalwart-mail.exe mv ./target/${{matrix.target}}/release/stalwart.exe ./artifacts/stalwart.exe
mv ./target/${{matrix.target}}/release/stalwart-cli.exe ./artifacts/stalwart-cli.exe mv ./target/${{matrix.target}}/release/stalwart-cli.exe ./artifacts/stalwart-cli.exe
- name: Upload Artifacts - name: Upload Artifacts
@ -349,17 +349,17 @@ jobs:
# Get latest FoundationDB installer # Get latest FoundationDB installer
curl --retry 5 -Lso foundationdb.pkg "$(gh api -X GET /repos/apple/foundationdb/releases --jq '.[] | select(.prerelease == false) | .assets[] | select(.name | test("${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}" + ".pkg$")) | .browser_download_url' | head -n1)" curl --retry 5 -Lso foundationdb.pkg "$(gh api -X GET /repos/apple/foundationdb/releases --jq '.[] | select(.prerelease == false) | .assets[] | select(.name | test("${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}" + ".pkg$")) | .browser_download_url' | head -n1)"
sudo installer -allowUntrusted -dumplog -pkg foundationdb.pkg -target / sudo installer -allowUntrusted -dumplog -pkg foundationdb.pkg -target /
cargo build --release --target ${{matrix.target}} -p mail-server --no-default-features --features "foundationdb elastic s3 redis nats enterprise" cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "foundationdb elastic s3 redis nats enterprise"
mkdir -p artifacts mkdir -p artifacts
mv ./target/${{matrix.target}}/release/stalwart-mail ./artifacts/stalwart-mail-foundationdb mv ./target/${{matrix.target}}/release/stalwart ./artifacts/stalwart-foundationdb
- name: Build - name: Build
run: | run: |
rustup target add ${{matrix.target}} rustup target add ${{matrix.target}}
cargo build --release --target ${{matrix.target}} -p mail-server --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise"
cargo build --release --target ${{matrix.target}} -p stalwart-cli cargo build --release --target ${{matrix.target}} -p stalwart-cli
mkdir -p artifacts mkdir -p artifacts
mv ./target/${{matrix.target}}/release/stalwart-mail ./artifacts/stalwart-mail mv ./target/${{matrix.target}}/release/stalwart ./artifacts/stalwart
mv ./target/${{matrix.target}}/release/stalwart-cli ./artifacts/stalwart-cli mv ./target/${{matrix.target}}/release/stalwart-cli ./artifacts/stalwart-cli
- name: Upload Artifacts - name: Upload Artifacts

52
Cargo.lock generated
View file

@ -4203,32 +4203,6 @@ dependencies = [
"webpki-roots 1.0.0", "webpki-roots 1.0.0",
] ]
[[package]]
name = "mail-server"
version = "0.12.0"
dependencies = [
"common",
"dav",
"directory",
"email",
"groupware",
"http 0.12.0",
"imap",
"jemallocator",
"jmap",
"jmap_proto",
"managesieve",
"migration",
"pop3",
"services",
"smtp",
"spam-filter",
"store",
"tokio",
"trc",
"utils",
]
[[package]] [[package]]
name = "managesieve" name = "managesieve"
version = "0.12.0" version = "0.12.0"
@ -7107,6 +7081,32 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "stalwart"
version = "0.12.0"
dependencies = [
"common",
"dav",
"directory",
"email",
"groupware",
"http 0.12.0",
"imap",
"jemallocator",
"jmap",
"jmap_proto",
"managesieve",
"migration",
"pop3",
"services",
"smtp",
"spam-filter",
"store",
"tokio",
"trc",
"utils",
]
[[package]] [[package]]
name = "stalwart-cli" name = "stalwart-cli"
version = "0.12.0" version = "0.12.0"

View file

@ -24,20 +24,20 @@ RUN rustup target add "$(cat /target.txt)"
COPY --from=planner /recipe.json /recipe.json COPY --from=planner /recipe.json /recipe.json
RUN RUSTFLAGS="$(cat /flags.txt)" cargo chef cook --target "$(cat /target.txt)" --release --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" --recipe-path /recipe.json RUN RUSTFLAGS="$(cat /flags.txt)" cargo chef cook --target "$(cat /target.txt)" --release --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" --recipe-path /recipe.json
COPY . . COPY . .
RUN RUSTFLAGS="$(cat /flags.txt)" cargo build --target "$(cat /target.txt)" --release -p mail-server --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" RUN RUSTFLAGS="$(cat /flags.txt)" cargo build --target "$(cat /target.txt)" --release -p stalwart --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise"
RUN RUSTFLAGS="$(cat /flags.txt)" cargo build --target "$(cat /target.txt)" --release -p stalwart-cli RUN RUSTFLAGS="$(cat /flags.txt)" cargo build --target "$(cat /target.txt)" --release -p stalwart-cli
RUN mv "/build/target/$(cat /target.txt)/release" "/output" RUN mv "/build/target/$(cat /target.txt)/release" "/output"
FROM docker.io/debian:bookworm-slim FROM docker.io/debian:bookworm-slim
WORKDIR /opt/stalwart-mail WORKDIR /opt/stalwart
RUN export DEBIAN_FRONTEND=noninteractive && \ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \ apt-get update && \
apt-get install -yq ca-certificates apt-get install -yq ca-certificates
COPY --from=builder /output/stalwart-mail /usr/local/bin COPY --from=builder /output/stalwart /usr/local/bin
COPY --from=builder /output/stalwart-cli /usr/local/bin COPY --from=builder /output/stalwart-cli /usr/local/bin
COPY ./resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh COPY ./resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod -R 755 /usr/local/bin RUN chmod -R 755 /usr/local/bin
CMD ["/usr/local/bin/stalwart-mail"] CMD ["/usr/local/bin/stalwart"]
VOLUME [ "/opt/stalwart-mail" ] VOLUME [ "/opt/stalwart" ]
EXPOSE 443 25 110 587 465 143 993 995 4190 8080 EXPOSE 443 25 110 587 465 143 993 995 4190 8080
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"] ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]

View file

@ -92,7 +92,7 @@ RUN \
--mount=type=cache,target=/usr/local/cargo/git \ --mount=type=cache,target=/usr/local/cargo/git \
source /env-cargo && \ source /env-cargo && \
if [ ! -z "${FDB_ARCH}" ]; then \ if [ ! -z "${FDB_ARCH}" ]; then \
RUSTFLAGS="-L /usr/lib" cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p mail-server --no-default-features --features "foundationdb elastic s3 redis nats enterprise"; \ RUSTFLAGS="-L /usr/lib" cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "foundationdb elastic s3 redis nats enterprise"; \
fi fi
RUN \ RUN \
--mount=type=secret,id=ACTIONS_RESULTS_URL,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=ACTIONS_RESULTS_URL,env=ACTIONS_RESULTS_URL \
@ -100,7 +100,7 @@ RUN \
--mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \ --mount=type=cache,target=/usr/local/cargo/git \
source /env-cargo && \ source /env-cargo && \
cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p mail-server --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" && \ cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" && \
cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p stalwart-cli cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p stalwart-cli
# Copy the source code # Copy the source code
COPY . . COPY . .
@ -114,8 +114,8 @@ RUN \
--mount=type=cache,target=/usr/local/cargo/git \ --mount=type=cache,target=/usr/local/cargo/git \
source /env-cargo && \ source /env-cargo && \
if [ ! -z "${FDB_ARCH}" ]; then \ if [ ! -z "${FDB_ARCH}" ]; then \
RUSTFLAGS="-L /usr/lib" cargo zigbuild --release --target ${TARGET} -p mail-server --no-default-features --features "foundationdb elastic s3 redis nats enterprise" && \ RUSTFLAGS="-L /usr/lib" cargo zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "foundationdb elastic s3 redis nats enterprise" && \
mv /app/target/${TARGET}/release/stalwart-mail /app/artifact/stalwart-mail-foundationdb; \ mv /app/target/${TARGET}/release/stalwart /app/artifact/stalwart-foundationdb; \
fi fi
# Build generic version # Build generic version
RUN \ RUN \
@ -124,9 +124,9 @@ RUN \
--mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \ --mount=type=cache,target=/usr/local/cargo/git \
source /env-cargo && \ source /env-cargo && \
cargo zigbuild --release --target ${TARGET} -p mail-server --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" && \ cargo zigbuild --release --target ${TARGET} -p stalwart --no-default-features --features "sqlite postgres mysql rocks elastic s3 redis azure nats enterprise" && \
cargo zigbuild --release --target ${TARGET} -p stalwart-cli && \ cargo zigbuild --release --target ${TARGET} -p stalwart-cli && \
mv /app/target/${TARGET}/release/stalwart-mail /app/artifact/stalwart-mail && \ mv /app/target/${TARGET}/release/stalwart /app/artifact/stalwart && \
mv /app/target/${TARGET}/release/stalwart-cli /app/artifact/stalwart-cli mv /app/target/${TARGET}/release/stalwart-cli /app/artifact/stalwart-cli
# ***************** # *****************
@ -139,16 +139,16 @@ COPY --from=builder /app/artifact /
# Runtime image for GNU targets # Runtime image for GNU targets
# ***************** # *****************
FROM --platform=$TARGETPLATFORM docker.io/library/debian:bookworm-slim AS gnu FROM --platform=$TARGETPLATFORM docker.io/library/debian:bookworm-slim AS gnu
WORKDIR /opt/stalwart-mail WORKDIR /opt/stalwart
RUN export DEBIAN_FRONTEND=noninteractive && \ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \ apt-get update && \
apt-get install -yq ca-certificates tzdata apt-get install -yq ca-certificates tzdata
COPY --from=builder /app/artifact/stalwart-mail /usr/local/bin COPY --from=builder /app/artifact/stalwart /usr/local/bin
COPY --from=builder /app/artifact/stalwart-cli /usr/local/bin COPY --from=builder /app/artifact/stalwart-cli /usr/local/bin
COPY ./resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh COPY ./resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod -R 755 /usr/local/bin RUN chmod -R 755 /usr/local/bin
CMD ["/usr/local/bin/stalwart-mail"] CMD ["/usr/local/bin/stalwart"]
VOLUME [ "/opt/stalwart-mail" ] VOLUME [ "/opt/stalwart" ]
EXPOSE 443 25 110 587 465 143 993 995 4190 8080 EXPOSE 443 25 110 587 465 143 993 995 4190 8080
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"] ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]
@ -156,13 +156,13 @@ ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]
# Runtime image for musl targets # Runtime image for musl targets
# ***************** # *****************
FROM --platform=$TARGETPLATFORM alpine AS musl FROM --platform=$TARGETPLATFORM alpine AS musl
WORKDIR /opt/stalwart-mail WORKDIR /opt/stalwart
RUN apk add --update --no-cache ca-certificates tzdata && rm -rf /var/cache/apk/* RUN apk add --update --no-cache ca-certificates tzdata && rm -rf /var/cache/apk/*
COPY --from=builder /app/artifact/stalwart-mail /usr/local/bin COPY --from=builder /app/artifact/stalwart /usr/local/bin
COPY --from=builder /app/artifact/stalwart-cli /usr/local/bin COPY --from=builder /app/artifact/stalwart-cli /usr/local/bin
COPY ./resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh COPY ./resources/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod -R 755 /usr/local/bin RUN chmod -R 755 /usr/local/bin
CMD ["/usr/local/bin/stalwart-mail"] CMD ["/usr/local/bin/stalwart"]
VOLUME [ "/opt/stalwart-mail" ] VOLUME [ "/opt/stalwart" ]
EXPOSE 443 25 110 587 465 143 993 995 4190 8080 EXPOSE 443 25 110 587 465 143 993 995 4190 8080
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"] ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]

View file

@ -9,7 +9,7 @@ This Agreement is entered into by and between Stalwart Labs Ltd and you, or the
1. DEFINITIONS 1. DEFINITIONS
1.1. "Software" refers to the Stalwart Mail & Collaboration Server Enterprise Edition software, including all its versions, updates, modifications, accompanying documentation, and related materials. 1.1. "Software" refers to the Stalwart Server Enterprise Edition software, including all its versions, updates, modifications, accompanying documentation, and related materials.
1.2. "Subscription" refers to the paid access to the Software provided by Licensor to Licensee. 1.2. "Subscription" refers to the paid access to the Software provided by Licensor to Licensee.
1.3. "Licensor" refers to Stalwart Labs Ltd, the entity providing the Software. 1.3. "Licensor" refers to Stalwart Labs Ltd, the entity providing the Software.
1.4. "Licensee" refers to the individual or entity installing, accessing, or using the Software with a valid Subscription. 1.4. "Licensee" refers to the individual or entity installing, accessing, or using the Software with a valid Subscription.
@ -54,7 +54,7 @@ This Agreement is entered into by and between Stalwart Labs Ltd and you, or the
7. LIMITATION OF LIABILITY 7. LIMITATION OF LIABILITY
7.1. In no event will the Licensor be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses, resulting from (i) your use or inability to use the Software; (ii) any unauthorized access to or use of our servers and/or any personal information stored therein. 7.1. In no event will the Licensor be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly, or any loss of data, use, goodwill, or other intangible losses, resulting from (i) your use or inability to use the Software; (ii) any unauthorized access to or use of our servers and/or any personal information stored therein.
7.3. Except for liability arising from death or personal injury caused by negligence, fraud, or willful misconduct, Licensor's total aggregate liability for any and all claims under this Agreement shall be limited to the total Subscription fees paid by Licensee to Licensor in the twelve (12) months immediately preceding the event giving rise to the claim. 7.2. Except for liability arising from death or personal injury caused by negligence, fraud, or willful misconduct, Licensor's total aggregate liability for any and all claims under this Agreement shall be limited to the total Subscription fees paid by Licensee to Licensor in the twelve (12) months immediately preceding the event giving rise to the claim.
8. GOVERNING LAW & JURISDICTION 8. GOVERNING LAW & JURISDICTION

View file

@ -5,13 +5,13 @@
</p> </p>
<h3 align="center"> <h3 align="center">
Secure & Modern All-in-One Mail Server (IMAP, JMAP, POP3, SMTP) 🛡️ Secure, scalable mail & collaboration server with comprehensive protocol support 🛡️ <br/>(IMAP, JMAP, SMTP, CalDAV, CardDAV, WebDAV)
</h3> </h3>
<br> <br>
<p align="center"> <p align="center">
<a href="https://github.com/stalwartlabs/mail-server/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/stalwartlabs/mail-server/ci.yml?style=flat-square" alt="continuous integration"></a> <a href="https://github.com/stalwartlabs/stalwart/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/stalwartlabs/stalwart/ci.yml?style=flat-square" alt="continuous integration"></a>
&nbsp; &nbsp;
<a href="https://www.gnu.org/licenses/agpl-3.0"><img src="https://img.shields.io/badge/License-AGPL_v3-blue.svg?label=license&style=flat-square" alt="License: AGPL v3"></a> <a href="https://www.gnu.org/licenses/agpl-3.0"><img src="https://img.shields.io/badge/License-AGPL_v3-blue.svg?label=license&style=flat-square" alt="License: AGPL v3"></a>
&nbsp; &nbsp;
@ -30,23 +30,33 @@
## Features ## Features
**Stalwart Mail Server** is an open-source mail server solution with JMAP, IMAP4, POP3, and SMTP support and a wide range of modern features. It is written in Rust and designed to be secure, fast, robust and scalable. **Stalwart** is an open-source mail & collaboration server solution with JMAP, IMAP4, POP3, SMTP, CalDAV, CardDAV and WebDAV support and a wide range of modern features. It is written in Rust and designed to be secure, fast, robust and scalable.
Key features: Key features:
- **JMAP**, **IMAP4**, **POP3** and **ManageSieve** server: - **Email** server with complete protocol support:
- [JMAP](https://datatracker.ietf.org/doc/html/rfc8621) server with - JMAP:
[Sieve Scripts](https://www.ietf.org/archive/id/draft-ietf-jmap-sieve-22.html), [WebSocket](https://datatracker.ietf.org/doc/html/rfc8887), [Blob Management](https://www.rfc-editor.org/rfc/rfc9404.html) and [Quotas](https://www.rfc-editor.org/rfc/rfc9425.html) extensions. * [JMAP for Mail](https://datatracker.ietf.org/doc/html/rfc8621) server.
- [IMAP4rev2](https://datatracker.ietf.org/doc/html/rfc9051) and [IMAP4rev1](https://datatracker.ietf.org/doc/html/rfc3501) server with support for [numerous extensions](https://stalw.art/docs/development/rfcs#imap4-and-extensions). * [JMAP for Sieve Scripts](https://www.ietf.org/archive/id/draft-ietf-jmap-sieve-22.html).
- [POP3](https://datatracker.ietf.org/doc/html/rfc1939) server with [extensions](https://datatracker.ietf.org/doc/html/rfc2449), [STLS](https://datatracker.ietf.org/doc/html/rfc2595) and [SASL](https://datatracker.ietf.org/doc/html/rfc5034) support. * [WebSocket](https://datatracker.ietf.org/doc/html/rfc8887), [Blob Management](https://www.rfc-editor.org/rfc/rfc9404.html) and [Quotas](https://www.rfc-editor.org/rfc/rfc9425.html) extensions.
- [ManageSieve](https://datatracker.ietf.org/doc/html/rfc5804) server for managing Sieve scripts. - IMAP:
- **SMTP** server: * [IMAP4rev2](https://datatracker.ietf.org/doc/html/rfc9051) and [IMAP4rev1](https://datatracker.ietf.org/doc/html/rfc3501) server.
- Built-in [DMARC](https://datatracker.ietf.org/doc/html/rfc7489), [DKIM](https://datatracker.ietf.org/doc/html/rfc6376), [SPF](https://datatracker.ietf.org/doc/html/rfc7208) and [ARC](https://datatracker.ietf.org/doc/html/rfc8617) support for message authentication. * [ManageSieve](https://datatracker.ietf.org/doc/html/rfc5804) server.
- Strong transport security through [DANE](https://datatracker.ietf.org/doc/html/rfc6698), [MTA-STS](https://datatracker.ietf.org/doc/html/rfc8461) and [SMTP TLS](https://datatracker.ietf.org/doc/html/rfc8460) reporting. * Numerous [extensions](https://stalw.art/docs/development/rfcs#imap4-and-extensions) supported.
- Inbound throttling and filtering with granular configuration rules, sieve scripting, MTA hooks and milter integration. - POP3:
- Distributed virtual queues with delayed delivery, priority delivery, quotas, routing rules and throttling support. - [POP3](https://datatracker.ietf.org/doc/html/rfc1939) server.
- Envelope rewriting and message modification. - [STLS](https://datatracker.ietf.org/doc/html/rfc2595) and [SASL](https://datatracker.ietf.org/doc/html/rfc5034) support as well as other [extensions](https://datatracker.ietf.org/doc/html/rfc2449).
- Built-in **Spam and Phishing** filter: - SMTP:
* SMTP server with built-in [DMARC](https://datatracker.ietf.org/doc/html/rfc7489), [DKIM](https://datatracker.ietf.org/doc/html/rfc6376), [SPF](https://datatracker.ietf.org/doc/html/rfc7208) and [ARC](https://datatracker.ietf.org/doc/html/rfc8617) support for message authentication.
* Strong transport security through [DANE](https://datatracker.ietf.org/doc/html/rfc6698), [MTA-STS](https://datatracker.ietf.org/doc/html/rfc8461) and [SMTP TLS](https://datatracker.ietf.org/doc/html/rfc8460) reporting.
* Inbound throttling and filtering with granular configuration rules, sieve scripting, MTA hooks and milter integration.
* Distributed virtual queues with delayed delivery, priority delivery, quotas, routing rules and throttling support.
* Envelope rewriting and message modification.
- **Calendar**, **Contacts** and **File Storage** server:
- [CalDAV](https://datatracker.ietf.org/doc/html/rfc4791) server for calendar and scheduling.
- [CardDAV](https://datatracker.ietf.org/doc/html/rfc6352) server for contact management.
- [WebDAV](https://datatracker.ietf.org/doc/html/rfc4918) server for file storage and sharing.
- **Spam** and **Phishing** built-in filter:
- Comprehensive set of filtering **rules** on par with popular solutions. - Comprehensive set of filtering **rules** on par with popular solutions.
- LLM-driven spam filtering and message analysis. - LLM-driven spam filtering and message analysis.
- Statistical **spam classifier** with automatic training capabilities. - Statistical **spam classifier** with automatic training capabilities.
@ -75,8 +85,6 @@ Key features:
- **Scalable and fault-tolerant**: - **Scalable and fault-tolerant**:
- Designed to handle growth seamlessly, from small setups to large-scale deployments. - Designed to handle growth seamlessly, from small setups to large-scale deployments.
- Built with **fault tolerance** and **high availability** in mind, recovers from hardware or software failures with minimal operational impact. - Built with **fault tolerance** and **high availability** in mind, recovers from hardware or software failures with minimal operational impact.
- Partition-tolerant **failure detection**, ensuring continuous operation even during network partitions or node failures.
- **Coordinator-free** architecture with automatic node discovery eliminates central bottlenecks and single points of failure.
- **Kubernetes** support for automated scaling and efficient container orchestration. - **Kubernetes** support for automated scaling and efficient container orchestration.
- Read replicas, sharded blob storage and in-memory data stores for high performance and low latency. - Read replicas, sharded blob storage and in-memory data stores for high performance and low latency.
- **Authentication and Authorization**: - **Authentication and Authorization**:
@ -108,11 +116,11 @@ Key features:
## Presentation ## Presentation
**Want a deeper dive?** Need to explain to your boss why Stalwart is the perfect fit? Whether you're evaluating options, making a case to your team, or simply curious about how it all works under the hood, these slides walk you through the key features, architecture, and benefits of Stalwart Mail Server. Browse the [slides](https://stalw.art/slides) to see what makes it stand out. **Want a deeper dive?** Need to explain to your boss why Stalwart is the perfect fit? Whether you're evaluating options, making a case to your team, or simply curious about how it all works under the hood, these slides walk you through the key features, architecture, and benefits of Stalwart. Browse the [slides](https://stalw.art/slides) to see what makes it stand out.
## Get Started ## Get Started
Install Stalwart Mail Server on your server by following the instructions for your platform: Install Stalwart on your server by following the instructions for your platform:
- [Linux / MacOS](https://stalw.art/docs/install/linux) - [Linux / MacOS](https://stalw.art/docs/install/linux)
- [Windows](https://stalw.art/docs/install/windows) - [Windows](https://stalw.art/docs/install/windows)
@ -122,14 +130,14 @@ All documentation is available at [stalw.art/docs/get-started](https://stalw.art
## Support ## Support
If you are having problems running Stalwart Mail Server, you found a bug or just have a question, If you are having problems running Stalwart, you found a bug or just have a question,
do not hesitate to reach us on [GitHub Discussions](https://github.com/stalwartlabs/mail-server/discussions), do not hesitate to reach us on [GitHub Discussions](https://github.com/stalwartlabs/stalwart/discussions),
[Reddit](https://www.reddit.com/r/stalwartlabs) or [Discord](https://discord.gg/aVQr3jF8jd). [Reddit](https://www.reddit.com/r/stalwartlabs) or [Discord](https://discord.gg/aVQr3jF8jd).
Additionally you may purchase an [premium support](https://stalw.art/support) to obtain priority support from Stalwart Labs LLC. Additionally you may purchase an [premium support](https://stalw.art/support) to obtain priority support from Stalwart Labs LLC.
## Sponsorship ## Sponsorship
Your support is crucial in helping us continue to improve the project, add new features, and maintain the highest level of quality. By [becoming a sponsor](https://opencollective.com/stalwart), you help fund the development and future of Stalwart Mail Server. As a thank-you, sponsors who contribute $5 per month or more will automatically receive a [Small Business Edition](https://stalw.art/small-business/) license, which includes all the powerful features of the [Enterprise edition](https://stalw.art/enterprise/). Your support is crucial in helping us continue to improve the project, add new features, and maintain the highest level of quality. By [becoming a sponsor](https://opencollective.com/stalwart), you help fund the development and future of Stalwart. As a thank-you, sponsors who contribute $5 per month or more will automatically receive a [Small Business Edition](https://stalw.art/small-business/) license, which includes all the powerful features of the [Enterprise edition](https://stalw.art/enterprise/).
These are some of our open-source sponsors: These are some of our open-source sponsors:
@ -139,15 +147,17 @@ These are some of our open-source sponsors:
## Roadmap ## Roadmap
- [ ] CalDAV, CardDAV and WebDAV support - [ ] JMAP for Calendars, Contacts and File Storage support
- [ ] JMAP Calendar, Contacts and Tasks support - [ ] Webmail client
- [ ] ActiveSync support
See the [enhancement requests](https://github.com/stalwartlabs/mail-server/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement) page for a full list of proposed features by the community. See the [enhancement requests](https://github.com/stalwartlabs/stalwart/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement) page for a full list of proposed features by the community.
## Funding ## Funding
Part of the development of this project was funded through the [NGI0 Entrust Fund](https://nlnet.nl/entrust), a fund established by [NLnet](https://nlnet.nl/) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101069594. Part of the development of this project was funded through:
- [NGI0 Entrust Fund](https://nlnet.nl/entrust), a fund established by [NLnet](https://nlnet.nl/) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101069594.
- [NGI Zero Core](https://nlnet.nl/NGI0/), a fund established by [NLnet](https://nlnet.nl/) with financial support from the European Commission's programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101092990.
If you find the project useful you can help by [becoming a sponsor](https://opencollective.com/stalwart). Thank you! If you find the project useful you can help by [becoming a sponsor](https://opencollective.com/stalwart). Thank you!
@ -162,4 +172,4 @@ Each file in this project contains a license notice at the top, indicating the a
## Copyright ## Copyright
Copyright (C) 2024, Stalwart Labs Ltd. Copyright (C) 2020, Stalwart Labs Ltd.

View file

@ -1,19 +1,18 @@
# Security Policy for Stalwart Mail Server # Security Policy for Stalwart
## Supported Versions ## Supported Versions
We provide security updates for the following versions of Stalwart Mail Server: We provide security updates for the following versions of Stalwart:
| Version | Supported | | Version | Supported |
| ------- | ------------------ | | ------- | ------------------ |
| 0.11.x | :white_check_mark: | | 0.12.x | :white_check_mark: |
| 0.10.x | :white_check_mark: | | 0.11.x | :white_check_mark: |
| 0.9.x | :white_check_mark: | | < 0.10 | :x: |
| < 0.8 | :x: |
## Reporting a Vulnerability ## Reporting a Vulnerability
We take the security of Stalwart Mail Server very seriously. If you believe you've found a security vulnerability, we encourage you to inform us responsibly. We take the security of Stalwart very seriously. If you believe you've found a security vulnerability, we encourage you to inform us responsibly.
**Do not report security vulnerabilities through public GitHub issues.** **Do not report security vulnerabilities through public GitHub issues.**

View file

@ -54,7 +54,7 @@ Upgrading from `v0.8.x` to `v0.9.0`
Version `0.9.0` introduces significant internal improvements while maintaining compatibility with existing database layouts and configuration file formats from version `0.8.0`. As a result, no data or configuration migration is necessary. This release focuses on enhancing performance and functionality, particularly in logging and tracing capabilities. Version `0.9.0` introduces significant internal improvements while maintaining compatibility with existing database layouts and configuration file formats from version `0.8.0`. As a result, no data or configuration migration is necessary. This release focuses on enhancing performance and functionality, particularly in logging and tracing capabilities.
To upgrade to Stalwart Mail Server version `0.9.0` from `0.8.x`, begin by downloading the latest version of the `stalwart-mail` binary. Once downloaded, replace the existing binary with the new version. Additionally, it's important to update the WebAdmin interface to the latest version to ensure compatibility and to access new features introduced in this release. To upgrade to Stalwart version `0.9.0` from `0.8.x`, begin by downloading the latest version of the `stalwart-mail` binary. Once downloaded, replace the existing binary with the new version. Additionally, it's important to update the WebAdmin interface to the latest version to ensure compatibility and to access new features introduced in this release.
In terms of breaking changes, this release brings significant updates to webhooks. All webhook event names have been modified, requiring a thorough review and adjustment of existing webhook configurations. Furthermore, the update introduces hundreds of new event types, enhancing the granularity and specificity of event handling capabilities. Users should familiarize themselves with these changes to effectively integrate them into their systems. In terms of breaking changes, this release brings significant updates to webhooks. All webhook event names have been modified, requiring a thorough review and adjustment of existing webhook configurations. Furthermore, the update introduces hundreds of new event types, enhancing the granularity and specificity of event handling capabilities. Users should familiarize themselves with these changes to effectively integrate them into their systems.
@ -151,7 +151,7 @@ Version `0.8.0` includes both performance and security enhancements that require
Upgrading from `v0.6.0` to `v0.7.0` Upgrading from `v0.6.0` to `v0.7.0`
----------------------------------- -----------------------------------
Version `0.7.0` of Stalwart Mail Server introduces significant improvements and features that enhance performance and functionality. However, it also comes with multiple breaking changes in the configuration files and a revamped database layout optimized for accessing large mailboxes. Additionally, Stalwart now supports compression for binaries stored in the blob store, further increasing efficiency. Version `0.7.0` of Stalwart introduces significant improvements and features that enhance performance and functionality. However, it also comes with multiple breaking changes in the configuration files and a revamped database layout optimized for accessing large mailboxes. Additionally, Stalwart now supports compression for binaries stored in the blob store, further increasing efficiency.
Due to these extensive changes, the recommended approach for upgrading is to perform a clean reinstallation of Stalwart and manually migrate your accounts to the new version. Due to these extensive changes, the recommended approach for upgrading is to perform a clean reinstallation of Stalwart and manually migrate your accounts to the new version.
## Pre-Upgrade Steps ## Pre-Upgrade Steps
@ -249,7 +249,7 @@ Upgrading from `v0.4.x` to `v0.5.0`
Rather than manually updating the configuration file, it is recommended to start with a fresh configuration file and update it with the necessary settings: Rather than manually updating the configuration file, it is recommended to start with a fresh configuration file and update it with the necessary settings:
- Install `v0.5.0` in a distinct directory. You now have the option to use an [internal directory](https://stalw.art/docs/directory/types/internal), which will allow you to manage users and groups directly from Stalwart Mail server. Alternatively, you can continue to use an external directory such as LDAP or SQL. - Install `v0.5.0` in a distinct directory. You now have the option to use an [internal directory](https://stalw.art/docs/directory/types/internal), which will allow you to manage users and groups directly from Stalwart server. Alternatively, you can continue to use an external directory such as LDAP or SQL.
- Update the configuration files with your previous settings. All configuration attributes are backward compatible, except those starting with `store.*`, `directory.*` and `jmap.purge.*`. - Update the configuration files with your previous settings. All configuration attributes are backward compatible, except those starting with `store.*`, `directory.*` and `jmap.purge.*`.
- Export each account following the procedure described in the [migration guide](https://stalw.art/docs/management/database/migrate). - Export each account following the procedure described in the [migration guide](https://stalw.art/docs/management/database/migrate).
- Stop the old `v0.4.x` server. - Stop the old `v0.4.x` server.
@ -301,14 +301,14 @@ Upgrading from `v0.3.x` to `v0.4.0`
5. **Configure the SPAM Filter Database:** Set up and configure the SPAM filter database. More details can be found [here](https://stalw.art/docs/spamfilter/settings/database). 5. **Configure the SPAM Filter Database:** Set up and configure the SPAM filter database. More details can be found [here](https://stalw.art/docs/spamfilter/settings/database).
6. **Review All TOML Files:** Navigate to every TOML file under the `etc/` directory and make necessary changes. 6. **Review All TOML Files:** Navigate to every TOML file under the `etc/` directory and make necessary changes.
7. **Update Binary:** Download and substitute the v0.4.0 binary suitable for your platform from [here](https://github.com/stalwartlabs/mail-server/releases/tag/v0.4.0). 7. **Update Binary:** Download and substitute the v0.4.0 binary suitable for your platform from [here](https://github.com/stalwartlabs/mail-server/releases/tag/v0.4.0).
8. **Restart Service:** Conclude by restarting the Stalwart Mail Server service. 8. **Restart Service:** Conclude by restarting the Stalwart service.
### Alternative Method: ### Alternative Method:
1. **Separate Installation:** Install v0.4.0 in a distinct directory. This will auto-update all configuration files and establish the spam filter database in SQLite format. 1. **Separate Installation:** Install v0.4.0 in a distinct directory. This will auto-update all configuration files and establish the spam filter database in SQLite format.
2. **Move Configuration Files:** Transfer the configuration files from `etc/` and the SQLite spam filter database from `data/` to your current installation's directory. 2. **Move Configuration Files:** Transfer the configuration files from `etc/` and the SQLite spam filter database from `data/` to your current installation's directory.
3. **Replace Binary:** Move the binary from the `bin/` directory to your current installation's `data/` directory. 3. **Replace Binary:** Move the binary from the `bin/` directory to your current installation's `data/` directory.
4. **Restart Service:** Finally, restart the Stalwart Mail Server service. 4. **Restart Service:** Finally, restart the Stalwart service.
We apologize for the lack of an automated migration tool for this upgrade. However, we are planning on introducing an automated migration tool in the near future. Thank you for your understanding and patience. We apologize for the lack of an automated migration tool for this upgrade. However, we are planning on introducing an automated migration tool in the near future. Thank you for your understanding and patience.

View file

@ -4,7 +4,7 @@
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: Stalwart Mail Server API title: Stalwart API
version: 1.0.0 version: 1.0.0
servers: servers:
- url: https://mail.example.org/api - url: https://mail.example.org/api

View file

@ -660,10 +660,10 @@ impl Metrics {
.property_or_default("metrics.open-telemetry.interval", "1m") .property_or_default("metrics.open-telemetry.interval", "1m")
.unwrap_or_else(|| Duration::from_secs(60)); .unwrap_or_else(|| Duration::from_secs(60));
let resource = Resource::new([ let resource = Resource::new([
KeyValue::new(SERVICE_NAME, "stalwart-mail"), KeyValue::new(SERVICE_NAME, "stalwart"),
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")), KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
]); ]);
let instrumentation = InstrumentationLibrary::builder("stalwart-mail") let instrumentation = InstrumentationLibrary::builder("stalwart")
.with_version(env!("CARGO_PKG_VERSION")) .with_version(env!("CARGO_PKG_VERSION"))
.build(); .build();

View file

@ -58,7 +58,7 @@ const HELP: &str = concat!(
env!("CARGO_PKG_VERSION"), env!("CARGO_PKG_VERSION"),
r#" r#"
Usage: stalwart-mail [OPTIONS] Usage: stalwart [OPTIONS]
Options: Options:
-c, --config <PATH> Start server with the specified configuration file -c, --config <PATH> Start server with the specified configuration file

View file

@ -32,10 +32,10 @@ pub(crate) fn spawn_otel_tracer(builder: SubscriberBuilder, mut otel: OtelTracer
let (_, mut rx) = builder.register(); let (_, mut rx) = builder.register();
tokio::spawn(async move { tokio::spawn(async move {
let resource = Cow::Owned(Resource::new([ let resource = Cow::Owned(Resource::new([
KeyValue::new(SERVICE_NAME, "stalwart-mail"), KeyValue::new(SERVICE_NAME, "stalwart"),
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")), KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
])); ]));
let instrumentation = InstrumentationLibrary::builder("stalwart-mail") let instrumentation = InstrumentationLibrary::builder("stalwart")
.with_version(env!("CARGO_PKG_VERSION")) .with_version(env!("CARGO_PKG_VERSION"))
.build(); .build();

View file

@ -1,10 +1,10 @@
[package] [package]
name = "mail-server" name = "stalwart"
description = "Stalwart Server" description = "Stalwart and Collaboration Server"
authors = [ "Stalwart Labs Ltd. <hello@stalw.art>"] authors = [ "Stalwart Labs Ltd. <hello@stalw.art>"]
repository = "https://github.com/stalwartlabs/jmap-server" repository = "https://github.com/stalwartlabs/jmap-server"
homepage = "https://stalw.art" homepage = "https://stalw.art"
keywords = ["imap", "jmap", "smtp", "email", "mail", "server"] keywords = ["imap", "jmap", "smtp", "email", "mail", "webdav", "server"]
categories = ["email"] categories = ["email"]
license = "AGPL-3.0-only OR LicenseRef-SEL" license = "AGPL-3.0-only OR LicenseRef-SEL"
version = "0.12.0" version = "0.12.0"
@ -12,7 +12,7 @@ edition = "2024"
resolver = "2" resolver = "2"
[[bin]] [[bin]]
name = "stalwart-mail" name = "stalwart"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]

View file

@ -26,8 +26,8 @@ mod test {
#[test] #[test]
#[ignore] #[ignore]
fn train() { fn train() {
let db = fs::read_to_string("/Users/me/code/mail-server/_ignore/old/spam_or_not_spam.csv") let db =
.unwrap(); fs::read_to_string("/Users/me/code/stalwart/_ignore/old/spam_or_not_spam.csv").unwrap();
let mut bayes = BayesModel::default(); let mut bayes = BayesModel::default();
for line in db.lines() { for line in db.lines() {
@ -47,7 +47,7 @@ mod test {
} }
println!("Ham: {} Spam: {}", bayes.ham_learns, bayes.spam_learns,); println!("Ham: {} Spam: {}", bayes.ham_learns, bayes.spam_learns,);
fs::write( fs::write(
"/Users/me/code/mail-server/_ignore/old/spam_or_not_spam.bin", "/Users/me/code/stalwart/_ignore/old/spam_or_not_spam.bin",
bincode::serialize(&bayes).unwrap(), bincode::serialize(&bayes).unwrap(),
) )
.unwrap(); .unwrap();
@ -57,7 +57,7 @@ mod test {
#[ignore] #[ignore]
fn classify() { fn classify() {
let model: BayesModel = bincode::deserialize( let model: BayesModel = bincode::deserialize(
&fs::read("/Users/me/code/mail-server/_ignore/old/spam_or_not_spam.bin").unwrap(), &fs::read("/Users/me/code/stalwart/_ignore/old/spam_or_not_spam.bin").unwrap(),
) )
.unwrap(); .unwrap();
let bayes = BayesClassifier::new(); let bayes = BayesClassifier::new();

View file

@ -66,7 +66,7 @@ impl NatsStore {
) )
.require_tls( .require_tls(
config config
.property_or_default((&prefix, "tls.require"), "false") .property_or_default((&prefix, "tls.enable"), "false")
.unwrap_or_default(), .unwrap_or_default(),
); );

View file

@ -1,6 +1,6 @@
#include <tunables/global> #include <tunables/global>
profile stalwart-mail flags=(attach_disconnected) { profile stalwart flags=(attach_disconnected) {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/nameservice> #include <abstractions/nameservice>
#include <abstractions/openssl> #include <abstractions/openssl>
@ -17,8 +17,8 @@ profile stalwart-mail flags=(attach_disconnected) {
owner /proc/*/net/if_inet6 r, owner /proc/*/net/if_inet6 r,
owner /proc/*/net/ipv6_route r, owner /proc/*/net/ipv6_route r,
# Full write access to /opt/stalwart-mail # Full write access to /opt/stalwart
/opt/stalwart-mail/** rwk, /opt/stalwart/** rwk,
# Allow creating directories under /tmp # Allow creating directories under /tmp
/tmp/ r, /tmp/ r,
@ -51,9 +51,9 @@ profile stalwart-mail flags=(attach_disconnected) {
network inet6 dgram bind port 7911, network inet6 dgram bind port 7911,
# Basic system access # Basic system access
/usr/bin/stalwart-mail rix, /usr/bin/stalwart rix,
/etc/stalwart-mail/** r, /etc/stalwart/** r,
/var/log/stalwart-mail/** w, /var/log/stalwart/** w,
# Additional permissions might be needed depending on specific requirements # Additional permissions might be needed depending on specific requirements
} }

View file

@ -1,5 +1,5 @@
############################################# #############################################
# Stalwart Mail Server Configuration File # Stalwart Configuration File
############################################# #############################################
[server.listener."smtp"] [server.listener."smtp"]
@ -65,8 +65,8 @@ ansi = false
enable = true enable = true
#[server.run-as] #[server.run-as]
#user = "stalwart-mail" #user = "stalwart"
#group = "stalwart-mail" #group = "stalwart"
[authentication.fallback-admin] [authentication.fallback-admin]
user = "admin" user = "admin"

View file

@ -40,12 +40,12 @@ RUN cargo build --manifest-path=crates/main/Cargo.toml --no-default-features --f
FROM debian:buster-slim AS runtime FROM debian:buster-slim AS runtime
COPY --from=builder /app/target/release/stalwart-mail /usr/local/bin/stalwart-mail COPY --from=builder /app/target/release/stalwart /usr/local/bin/stalwart
RUN apt-get update -y && apt-get install -yq ca-certificates RUN apt-get update -y && apt-get install -yq ca-certificates
RUN curl -LO https://github.com/apple/foundationdb/releases/download/7.1.0/foundationdb-clients_7.1.0-1_amd64.deb && \ RUN curl -LO https://github.com/apple/foundationdb/releases/download/7.1.0/foundationdb-clients_7.1.0-1_amd64.deb && \
dpkg -i foundationdb-clients_7.1.0-1_amd64.deb dpkg -i foundationdb-clients_7.1.0-1_amd64.deb
RUN useradd stalwart-mail -s /sbin/nologin -M RUN useradd stalwart -s /sbin/nologin -M
RUN mkdir -p /opt/stalwart-mail RUN mkdir -p /opt/stalwart
RUN chown stalwart-mail:stalwart-mail /opt/stalwart-mail RUN chown stalwart:stalwart /opt/stalwart
ENTRYPOINT ["/usr/local/bin/stalwart-mail", "--config", "/opt/stalwart-mail/etc/config.toml"] ENTRYPOINT ["/usr/local/bin/stalwart", "--config", "/opt/stalwart/etc/config.toml"]

View file

@ -1,12 +1,12 @@
#!/usr/bin/env sh #!/usr/bin/env sh
# shellcheck shell=dash # shellcheck shell=dash
# Stalwart Mail Server install script -- based on the rustup installation script. # Stalwart install script -- based on the rustup installation script.
set -e set -e
set -u set -u
readonly BASE_URL="https://github.com/stalwartlabs/mail-server/releases/latest/download" readonly BASE_URL="https://github.com/stalwartlabs/stalwart/releases/latest/download"
main() { main() {
downloader --check downloader --check
@ -26,16 +26,16 @@ main() {
# Detect OS # Detect OS
local _os="unknown" local _os="unknown"
local _uname="$(uname)" local _uname="$(uname)"
_account="stalwart-mail" _account="stalwart"
if [ "${_uname}" = "Linux" ]; then if [ "${_uname}" = "Linux" ]; then
_os="linux" _os="linux"
elif [ "${_uname}" = "Darwin" ]; then elif [ "${_uname}" = "Darwin" ]; then
_os="macos" _os="macos"
_account="_stalwart-mail" _account="_stalwart"
fi fi
# Default component setting # Default component setting
local _component="stalwart-mail" local _component="stalwart"
local _dir="/usr/local/bin" local _dir="/usr/local/bin"
# Detect platform architecture # Detect platform architecture
@ -45,11 +45,11 @@ main() {
# Download latest binary # Download latest binary
say "⏳ Downloading ${_component} for ${_arch}..." say "⏳ Downloading ${_component} for ${_arch}..."
local _file="${_dir}/stalwart-mail.tar.gz" local _file="${_dir}/stalwart.tar.gz"
local _url="${BASE_URL}/${_component}-${_arch}.tar.gz" local _url="${BASE_URL}/${_component}-${_arch}.tar.gz"
ensure downloader "$_url" "$_file" "$_arch" ensure downloader "$_url" "$_file" "$_arch"
ensure tar zxvf "$_file" -C "$_dir" ensure tar zxvf "$_file" -C "$_dir"
ignore chmod +x "$_dir/stalwart-mail" ignore chmod +x "$_dir/stalwart"
ignore rm "$_file" ignore rm "$_file"
return 0 return 0

View file

@ -2,9 +2,9 @@
# shellcheck shell=dash # shellcheck shell=dash
# If the configuration file does not exist initialize it. # If the configuration file does not exist initialize it.
if [ ! -f /opt/stalwart-mail/etc/config.toml ]; then if [ ! -f /opt/stalwart/etc/config.toml ]; then
/usr/local/bin/stalwart-mail --init /opt/stalwart-mail /usr/local/bin/stalwart --init /opt/stalwart
fi fi
# If the configuration file exists, start the server. # If the configuration file exists, start the server.
exec /usr/local/bin/stalwart-mail --config /opt/stalwart-mail/etc/config.toml exec /usr/local/bin/stalwart --config /opt/stalwart/etc/config.toml

View file

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Stalwart Mail Server Description=Stalwart Server
Conflicts=postfix.service sendmail.service exim4.service Conflicts=postfix.service sendmail.service exim4.service
ConditionPathExists=__PATH__/etc/config.toml ConditionPathExists=__PATH__/etc/config.toml
After=network-online.target After=network-online.target
@ -11,10 +11,10 @@ KillMode=process
KillSignal=SIGINT KillSignal=SIGINT
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5
ExecStart=__PATH__/bin/stalwart-mail --config=__PATH__/etc/config.toml ExecStart=__PATH__/bin/stalwart --config=__PATH__/etc/config.toml
SyslogIdentifier=stalwart-mail SyslogIdentifier=stalwart
User=stalwart-mail User=stalwart
Group=stalwart-mail Group=stalwart
AmbientCapabilities=CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install] [Install]

View file

@ -6,10 +6,10 @@
<key>Label</key> <key>Label</key>
<string>stalwart.mail</string> <string>stalwart.mail</string>
<key>ServiceDescription</key> <key>ServiceDescription</key>
<string>Stalwart Mail Server</string> <string>Stalwart</string>
<key>ProgramArguments</key> <key>ProgramArguments</key>
<array> <array>
<string>__PATH__/bin/stalwart-mail</string> <string>__PATH__/bin/stalwart</string>
<string>--config=__PATH__/etc/config.toml</string> <string>--config=__PATH__/etc/config.toml</string>
</array> </array>
<key>RunAtLoad</key> <key>RunAtLoad</key>

View file

@ -6,4 +6,4 @@ cp ./tests/resources/acme/config.toml /tmp/stalwart-temp-data/config.toml
curl --request POST --data '{"ip":"192.168.5.2"}' http://localhost:8055/set-default-ipv4 curl --request POST --data '{"ip":"192.168.5.2"}' http://localhost:8055/set-default-ipv4
cargo run -p mail-server --no-default-features --features "sqlite foundationdb postgres mysql rocks elastic s3 redis" -- --config=/tmp/stalwart-temp-data/config.toml cargo run -p stalwart --no-default-features --features "sqlite foundationdb postgres mysql rocks elastic s3 redis" -- --config=/tmp/stalwart-temp-data/config.toml

View file

@ -5,13 +5,13 @@ FEATURES="rocks"
NUM_NODES=5 NUM_NODES=5
# Kill previous processes # Kill previous processes
sudo pkill stalwart-mail sudo pkill stalwart
# Delete previous tests # Delete previous tests
rm -rf $BASE_DIR rm -rf $BASE_DIR
# Build the mail-server binary # Build the stalwart binary
cargo build -p mail-server --no-default-features --features "$FEATURES" cargo build -p stalwart --no-default-features --features "$FEATURES"
for NUM in $(seq 1 $NUM_NODES); do for NUM in $(seq 1 $NUM_NODES); do
sudo ifconfig en0 alias 10.0.$NUM.1 netmask 255.255.255.0 sudo ifconfig en0 alias 10.0.$NUM.1 netmask 255.255.255.0
@ -49,5 +49,5 @@ config.resource.spam-filter = "file:///dev/null"
config.resource.webadmin = "file:///dev/null" config.resource.webadmin = "file:///dev/null"
EOF EOF
sudo ./target/debug/stalwart-mail --config $BASE_DIR/config$NUM.toml & sudo ./target/debug/stalwart --config $BASE_DIR/config$NUM.toml &
done done

View file

@ -7,9 +7,9 @@ FEATURES="sqlite foundationdb postgres mysql rocks elastic s3 redis"
rm -rf $BASE_DIR rm -rf $BASE_DIR
# Create admin user # Create admin user
cargo run -p mail-server --no-default-features --features "$FEATURES" -- --init=$BASE_DIR cargo run -p stalwart --no-default-features --features "$FEATURES" -- --init=$BASE_DIR
printf "[server.http]\npermissive-cors = true\n" >> $BASE_DIR/etc/config.toml printf "[server.http]\npermissive-cors = true\n" >> $BASE_DIR/etc/config.toml
printf "[tracer.stdout]\ntype = 'stdout'\nlevel = 'trace'\nansi = true\nenable = true\n" >> $BASE_DIR/etc/config.toml printf "[tracer.stdout]\ntype = 'stdout'\nlevel = 'trace'\nansi = true\nenable = true\n" >> $BASE_DIR/etc/config.toml
sed -i '' 's/secret =/secret = "secret"\n#secret =/g' $BASE_DIR/etc/config.toml sed -i '' 's/secret =/secret = "secret"\n#secret =/g' $BASE_DIR/etc/config.toml
#cargo run -p mail-server --no-default-features --features "$FEATURES" -- --config=$BASE_DIR/etc/config.toml #cargo run -p stalwart --no-default-features --features "$FEATURES" -- --config=$BASE_DIR/etc/config.toml