diff options
author | AlphaJack | 2024-04-10 13:56:19 +0200 |
---|---|---|
committer | AlphaJack | 2024-04-10 13:56:19 +0200 |
commit | 8d0005b3b698b8e465bcbd062c6b182b390853a9 (patch) | |
tree | 84db5ef84fe54a9ede21f7b0aec510df6c83bebf | |
download | aur-8d0005b3b698b8e465bcbd062c6b182b390853a9.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | config.toml | 65 | ||||
-rw-r--r-- | stalwart.install | 17 | ||||
-rw-r--r-- | stalwart.service | 17 | ||||
-rw-r--r-- | stalwart.sysusers | 1 | ||||
-rw-r--r-- | stalwart.tmpfiles | 3 |
8 files changed, 174 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f4fd55249df2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = stalwart-mail-bin + pkgdesc = Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP) + pkgver = 0.7.0 + pkgrel = 1 + url = https://stalw.art/ + install = stalwart.install + arch = x86_64 + arch = aarch64 + license = AGPL-3.0 + optdepends = stalwart-cli: command line interface + optdepends = postgresql: storage backend + optdepends = sqlite: storage backend + optdepends = mariadb: storage backend + optdepends = redis: lookup storage backend + provides = stalwart + provides = stalwart-mail + backup = etc/stalwart/config.toml + source = config.toml + source = stalwart.service + source = stalwart.sysusers + source = stalwart.tmpfiles + b2sums = 671da72fb777c44c8ce09cc130be246c22eba43fb6d8a01450b04a6727a36bad5dadf16c8a3d924e4be3f34e2914128674711e06ed53d6013bfeb546b0c5400c + b2sums = fc075fd22b0fb622f516f4e3eb360fadaf484bc744cda0d5add7be74f77d26322cfef20e0ad0aa9ef9d15e8d6503fc043ccc3fc8c9c40803cde570fd0c82acf7 + b2sums = 2b7ed52588e70aa3f77fb7f16dcbd9aa02c2137aa92ba99f71e797734e6e617747f225a0582473c1c356ec4611ba57c72ad3855ea43f57d426c5a1e2174b91ad + b2sums = 2915e7410e317dbf78e164af09b65c1c5b737782cf8ec7c5cd287be58306a16d823c3afd55d9569e89561ec7a712a6fcd3487af1d0351847829cdd202d4c9489 + source_x86_64 = https://github.com/stalwartlabs/mail-server/releases/download/v0.7.0/stalwart-mail-x86_64-unknown-linux-gnu.tar.gz + b2sums_x86_64 = b20a2335db87bc63d5e17bad054707b6942da7c56332030f58815d117cb56d06e22e296d515676f769662ee7cfc3d1f16f75b0fba6d40a8d649eae333cb2d3b3 + source_aarch64 = https://github.com/stalwartlabs/mail-server/releases/download/v0.7.0/stalwart-mail-aarch64-unknown-linux-gnu.tar.gz + b2sums_aarch64 = ba9f8501822141d64ece8b3d6c20ea3b945282917f855ec3cca5eae167cf3f8dd8ba8ec2af2e779f53df39bb8a7362393ec3452d195af39e31bb22bab1c44a5a + +pkgname = stalwart-mail-bin diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..dd38fa22d95f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.tar* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..298d1957febc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: AlphaJack <alphajack at tuta dot io> + +pkgname="stalwart-mail-bin" +pkgver=0.7.0 +pkgrel=1 +pkgdesc="Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP)" +arch=("x86_64" "aarch64") +url="https://stalw.art/" +license=("AGPL-3.0") +provides=("stalwart" "stalwart-mail") +conflict=("stalwart" "stalwart-mail") +optdepends=("stalwart-cli: command line interface" + "postgresql: storage backend" + "sqlite: storage backend" + "mariadb: storage backend" + "redis: lookup storage backend") +source=("config.toml" + "stalwart."{service,sysusers,tmpfiles}) +source_x86_64=("https://github.com/stalwartlabs/mail-server/releases/download/v$pkgver/stalwart-mail-x86_64-unknown-linux-gnu.tar.gz") +source_aarch64=("https://github.com/stalwartlabs/mail-server/releases/download/v$pkgver/stalwart-mail-aarch64-unknown-linux-gnu.tar.gz") +b2sums=('671da72fb777c44c8ce09cc130be246c22eba43fb6d8a01450b04a6727a36bad5dadf16c8a3d924e4be3f34e2914128674711e06ed53d6013bfeb546b0c5400c' + 'fc075fd22b0fb622f516f4e3eb360fadaf484bc744cda0d5add7be74f77d26322cfef20e0ad0aa9ef9d15e8d6503fc043ccc3fc8c9c40803cde570fd0c82acf7' + '2b7ed52588e70aa3f77fb7f16dcbd9aa02c2137aa92ba99f71e797734e6e617747f225a0582473c1c356ec4611ba57c72ad3855ea43f57d426c5a1e2174b91ad' + '2915e7410e317dbf78e164af09b65c1c5b737782cf8ec7c5cd287be58306a16d823c3afd55d9569e89561ec7a712a6fcd3487af1d0351847829cdd202d4c9489') +b2sums_x86_64=('b20a2335db87bc63d5e17bad054707b6942da7c56332030f58815d117cb56d06e22e296d515676f769662ee7cfc3d1f16f75b0fba6d40a8d649eae333cb2d3b3') +b2sums_aarch64=('ba9f8501822141d64ece8b3d6c20ea3b945282917f855ec3cca5eae167cf3f8dd8ba8ec2af2e779f53df39bb8a7362393ec3452d195af39e31bb22bab1c44a5a') +b2sum_x86_64=("A") +b2sum_aarch64=("A") +backup=("etc/stalwart/config.toml") +install="stalwart.install" + +package(){ + install -d -m 0750 "$pkgdir/etc/stalwart" + install -D -m 0755 "stalwart-mail" "$pkgdir/usr/bin/stalwart-mail" + install -D -m 0644 "stalwart.service" "$pkgdir/usr/lib/systemd/system/stalwart.service" + install -D -m 0644 "stalwart.sysusers" "$pkgdir/usr/lib/sysusers.d/stalwart.conf" + install -D -m 0644 "stalwart.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/stalwart.conf" + install -D -m 0640 "config.toml" "$pkgdir/etc/stalwart/config.toml" +} diff --git a/config.toml b/config.toml new file mode 100644 index 000000000000..857d916ef18d --- /dev/null +++ b/config.toml @@ -0,0 +1,65 @@ +############################################# +# Stalwart Mail Server Configuration File +############################################# + +[server.listener."smtp"] +bind = ["[::]:25"] +protocol = "smtp" + +[server.listener."submission"] +bind = ["[::]:587"] +protocol = "smtp" + +[server.listener."submissions"] +bind = ["[::]:465"] +protocol = "smtp" +tls.implicit = true + +[server.listener."imap"] +bind = ["[::]:143"] +protocol = "imap" + +[server.listener."imaptls"] +bind = ["[::]:993"] +protocol = "imap" +tls.implicit = true + +[server.listener."sieve"] +bind = ["[::]:4190"] +protocol = "managesieve" + +[server.listener."https"] +protocol = "http" +bind = ["[::]:443"] +tls.implicit = true + +[storage] +data = "rocksdb" +fts = "rocksdb" +blob = "rocksdb" +lookup = "rocksdb" +directory = "internal" + +[store."rocksdb"] +type = "rocksdb" +path = "/var/lib/stalwart" +compression = "lz4" + +[directory."internal"] +type = "internal" +store = "rocksdb" + +[tracer."stdout"] +type = "stdout" +level = "info" +ansi = false +enable = true + +[server.run-as] +user = "stalwart" +group = "stalwart" + +# replace this hash with the output of 'openssl passwd -6' +[authentication.fallback-admin] +user = "admin" +secret = "$6$MM1wz7Y8.L8O4eN0$ti3/072t3T5SJ6xryK45RvpW38dW2hSH86cBcV0XHtgnBYCCAFjqibS84OsdxfAITd6.VkKfhfUhlfVczdkFx1" diff --git a/stalwart.install b/stalwart.install new file mode 100644 index 000000000000..70c244ccefb5 --- /dev/null +++ b/stalwart.install @@ -0,0 +1,17 @@ +post_install(){ + cat <<INFO + +To complete the installation of Stalwart, create an admin password with + + openssl passwd -6 + +Then copy the hash to /etc/stalwart/config.toml as the fallback admin secret. + +Once done, start the server by running: + + sudo systemctl start stalwart.service + +and login from the web interface at https://localhost:443/ to access the administrator panel. + +INFO +} diff --git a/stalwart.service b/stalwart.service new file mode 100644 index 000000000000..62b6fbb64810 --- /dev/null +++ b/stalwart.service @@ -0,0 +1,17 @@ +[Unit] +Description=Stalwart Mail Server Server +Conflicts=postfix.service sendmail.service exim4.service +After=network-online.target + +[Service] +Type=simple +LimitNOFILE=65536 +KillMode=process +KillSignal=SIGINT +Restart=on-failure +RestartSec=5 +ExecStart=/usr/bin/stalwart-mail --config=/etc/stalwart/config.toml +PermissionsStartOnly=true + +[Install] +WantedBy=multi-user.target diff --git a/stalwart.sysusers b/stalwart.sysusers new file mode 100644 index 000000000000..875b2ddb0c63 --- /dev/null +++ b/stalwart.sysusers @@ -0,0 +1 @@ +u stalwart - "Stalwart User" /var/lib/stalwart - diff --git a/stalwart.tmpfiles b/stalwart.tmpfiles new file mode 100644 index 000000000000..afb4d54ab857 --- /dev/null +++ b/stalwart.tmpfiles @@ -0,0 +1,3 @@ +d /etc/stalwart 0750 stalwart stalwart - - +f /etc/stalwart/config.toml 0640 stalwart stalwart - - +d /var/lib/stalwart 0750 stalwart stalwart - - |