mirror of
https://github.com/chatmail/relay.git
synced 2026-11-23 21:39:35 +00:00
Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3111cbe70c | ||
|
|
16d4df3994 | ||
|
|
7a0bd2d4f8 | ||
|
|
5bd9adda41 | ||
|
|
d1493845dd | ||
|
|
f964f3d758 | ||
|
|
8c84d4bd87 | ||
|
|
4a36cc79a0 | ||
|
|
daffa925ab | ||
|
|
5facce617b | ||
|
|
eec041a44e | ||
|
|
f27de2ad24 | ||
|
|
a3693f07c5 | ||
|
|
305d83fff3 |
@@ -1,4 +1,4 @@
|
||||
|
||||
Please refer to
|
||||
[Delta Chat community standards and practices](https://delta.chat/en/community-standards)
|
||||
[Delta Chat community standards and practices](https://delta.chat/community-standards)
|
||||
which also apply for all chatmail developments.
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
persist-credentials: false
|
||||
- name: download filtermail
|
||||
run: curl -L https://github.com/chatmail/filtermail/releases/download/v0.7.7/filtermail-x86_64 -o /usr/local/bin/filtermail && chmod +x /usr/local/bin/filtermail
|
||||
run: curl -L https://github.com/chatmail/filtermail/releases/download/v0.7.8/filtermail-x86_64 -o /usr/local/bin/filtermail && chmod +x /usr/local/bin/filtermail
|
||||
- name: run chatmaild tests
|
||||
working-directory: chatmaild
|
||||
run: pipx run tox
|
||||
|
||||
@@ -31,7 +31,7 @@ class Config:
|
||||
self.max_user_send_per_minute = int(params.pop("max_user_send_per_minute", 60))
|
||||
self.max_user_send_burst_size = int(params.pop("max_user_send_burst_size", 10))
|
||||
self.max_mailbox_size = params.pop("max_mailbox_size", "500M")
|
||||
self.max_message_size = int(params.pop("max_message_size", 31457280))
|
||||
self.max_message_size = int(params.pop("max_message_size", 52428800))
|
||||
self.delete_mails_after = params.pop("delete_mails_after", "20")
|
||||
self.delete_large_after = params.pop("delete_large_after", "7")
|
||||
self.delete_inactive_users_after = int(
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
"sources": [
|
||||
{
|
||||
"sourceId": "gplay",
|
||||
"versionInteger": 758,
|
||||
"versionString": "2.62.0",
|
||||
"downloadUrl": "https://github.com/deltachat/deltachat-android/releases/download/v2.62.0/deltachat-gplay-release-2.62.0.apk"
|
||||
"versionInteger": 761,
|
||||
"versionString": "2.69.0",
|
||||
"downloadUrl": "https://github.com/deltachat/deltachat-android/releases/download/v2.69.0/deltachat-gplay-release-2.69.0.apk"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ mail_domain = {mail_domain}
|
||||
#max_mailbox_size = 500M
|
||||
|
||||
# maximum message size for an e-mail in bytes
|
||||
#max_message_size = 31457280
|
||||
#max_message_size = 52428800
|
||||
|
||||
# days after which mails are unconditionally deleted
|
||||
#delete_mails_after = 20
|
||||
|
||||
@@ -12,6 +12,7 @@ from chatmaild.config import read_config
|
||||
from pyinfra import facts, host, logger
|
||||
from pyinfra.api import FactBase
|
||||
from pyinfra.facts import hardware
|
||||
from pyinfra.facts.files import Sha256File
|
||||
from pyinfra.facts.systemd import SystemdEnabled
|
||||
from pyinfra.operations import apt, files, pip, server, systemd
|
||||
|
||||
@@ -38,6 +39,8 @@ from .postfix.deployer import PostfixDeployer
|
||||
from .selfsigned.deployer import SelfSignedTlsDeployer
|
||||
from .www import build_webpages, find_merge_conflict, get_paths
|
||||
|
||||
OLD_JOURNALD_SHA256 = "107c678516c972d5293a67386458fd4785d467cfa2f2b7174185e9a74e034be5"
|
||||
|
||||
|
||||
class Port(FactBase):
|
||||
"""
|
||||
@@ -354,7 +357,15 @@ class IrohDeployer(Deployer):
|
||||
|
||||
class JournaldDeployer(Deployer):
|
||||
def configure(self):
|
||||
self.put_file("journald.conf", "/etc/systemd/journald.conf")
|
||||
self.put_file("90-volatile-logging.conf", "/etc/systemd/journald.conf.d/90-volatile-logging.conf")
|
||||
if host.get_fact(Sha256File, "/etc/systemd/journald.conf") == OLD_JOURNALD_SHA256:
|
||||
server.shell(
|
||||
name="Restore Debian's journald.conf",
|
||||
commands=[
|
||||
"rm /etc/systemd/journald.conf",
|
||||
"DEBIAN_FRONTEND=noninteractive apt-get install -y --reinstall -o Dpkg::Options::=--force-confmiss systemd",
|
||||
],
|
||||
)
|
||||
|
||||
def activate(self):
|
||||
self.ensure_service("systemd-journald.service")
|
||||
|
||||
@@ -56,8 +56,6 @@ mail_server_admin = mailto:{{ config.privacy_mail }}
|
||||
# <https://doc.dovecot.org/2.3/configuration_manual/quota_plugin/>
|
||||
mail_plugins = zlib quota
|
||||
|
||||
imap_capability = +XDELTAPUSH XCHATMAIL
|
||||
|
||||
|
||||
# Authentication for system users.
|
||||
passdb {
|
||||
|
||||
@@ -68,6 +68,11 @@ http {
|
||||
|
||||
listen 127.0.0.1:8443 ssl default_server;
|
||||
|
||||
# nginx is reached through the stream proxy on port 443,
|
||||
# so redirects it generates itself (e.g. /dir -> /dir/)
|
||||
# must not contain the internal port 8443.
|
||||
absolute_redirect off;
|
||||
|
||||
root {{ www_root }};
|
||||
|
||||
index index.html index.htm;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
"""Versions, hashes, and download URLs for pre-built artifacts fetched during deploy."""
|
||||
|
||||
FILTERMAIL_VERSION = "v0.7.7"
|
||||
FILTERMAIL_VERSION = "v0.7.8"
|
||||
FILTERMAIL_ARTIFACTS = {
|
||||
"x86_64": (
|
||||
f"https://github.com/chatmail/filtermail/releases/download/{FILTERMAIL_VERSION}/filtermail-x86_64",
|
||||
"0691debf501f854f4e6a9dd6516f3a0ef03d95721a9b540309014bfe1a1f52b1",
|
||||
"f470431f98468b9f4d2452470bffc00c0010b3f92655005d59b997f599fd7d4a",
|
||||
),
|
||||
"aarch64": (
|
||||
f"https://github.com/chatmail/filtermail/releases/download/{FILTERMAIL_VERSION}/filtermail-aarch64",
|
||||
"964f85df8b65b812666113f968cbfdd8da88ce16d218284deb359c1e2400d2da",
|
||||
"a15a476ab92072ad22f1bc9d81e5c545bc3d81fc9d446d53f8cc1de810867837",
|
||||
),
|
||||
"mtail": (
|
||||
f"https://raw.githubusercontent.com/chatmail/filtermail/{FILTERMAIL_VERSION}/contrib/filtermail.mtail",
|
||||
|
||||
@@ -127,6 +127,7 @@ lmtp-filtermail_destination_concurrency_limit=10000
|
||||
|
||||
# Do not try to deliver messages for more than 2 days.
|
||||
maximal_queue_lifetime = 2d
|
||||
bounce_queue_lifetime = 2d
|
||||
|
||||
{% if not config.ipv4_relay %}
|
||||
# DKIM-sign locally generated mail (bounces, DSNs).
|
||||
|
||||
@@ -15,13 +15,6 @@ def test_init(tmp_path, maildomain):
|
||||
assert config.mail_domain_bare == maildomain
|
||||
|
||||
|
||||
def test_capabilities(imap):
|
||||
imap.connect()
|
||||
capas = imap.conn.capabilities
|
||||
assert "XCHATMAIL" in capas
|
||||
assert "XDELTAPUSH" in capas
|
||||
|
||||
|
||||
def test_login_basic_functioning(imap_or_smtp, gencreds, lp):
|
||||
"""Test a) that an initial login creates a user automatically
|
||||
and b) verify we can also login a second time with the same password
|
||||
|
||||
+1
-1
@@ -90,4 +90,4 @@ enforce end-to-end encryption on their own.
|
||||
The end-to-end encryption protection includes attached media, user
|
||||
display names, avatars and group names. What is visible to operators is:
|
||||
message date, sender and receiver addresses.
|
||||
Please see the `Delta Chat FAQ on encryption and security <https://delta.chat/en/help#e2ee>`_ for further info.
|
||||
Please see the `Delta Chat FAQ on encryption and security <https://delta.chat/help#e2ee>`_ for further info.
|
||||
|
||||
+6
-10
@@ -52,8 +52,7 @@ The deployed system components of a chatmail relay are:
|
||||
- `acmetool <https://hlandau.github.io/acmetool/>`_ manages TLS
|
||||
certificates for Dovecot, Postfix, and Nginx
|
||||
|
||||
- `OpenDKIM <http://www.opendkim.org/>`_ for signing messages with
|
||||
DKIM and rejecting inbound messages without DKIM
|
||||
- `OpenDKIM <http://www.opendkim.org/>`_ for signing outgoing messages with DKIM
|
||||
|
||||
- `mtail <https://google.github.io/mtail/>`_ for collecting anonymized
|
||||
metrics in case you have monitoring
|
||||
@@ -97,7 +96,7 @@ short overview of ``chatmaild`` services:
|
||||
to store user-specific relay-side config. On new messages, it
|
||||
:repofile:`passes the user’s push notification token <chatmaild/src/chatmaild/notifier.py>`
|
||||
to
|
||||
`notifications.delta.chat <https://delta.chat/en/help#instant-delivery>`_
|
||||
`notifications.delta.chat <https://delta.chat/help#instant-delivery>`_
|
||||
so the push notifications on the user’s phone can be triggered by
|
||||
Apple/Google/Huawei.
|
||||
|
||||
@@ -294,15 +293,14 @@ Dovecot_ listens on ports
|
||||
|
||||
Nginx_ listens on port
|
||||
|
||||
- 80 (HTTP), which passes certificate challenges on to
|
||||
`acmetool <https://hlandau.github.io/acmetool/>`_ and redirects everything else to HTTPS,
|
||||
|
||||
- 8443 (HTTPS-ALT) and
|
||||
|
||||
- 443 (HTTPS) which multiplexes HTTPS, IMAP and SMTP using ALPN
|
||||
to redirect connections to ports 8443, 465 or 993.
|
||||
|
||||
`acmetool <https://hlandau.github.io/acmetool/>`_ listens on port:
|
||||
|
||||
- 80 (HTTP).
|
||||
|
||||
`chatmail-turn <https://github.com/chatmail/chatmail-turn>`_ listens on port
|
||||
|
||||
- 3478 UDP (STUN/TURN), and temporarily opens further UDP ports
|
||||
@@ -322,12 +320,10 @@ Chatmail relays enforce :rfc:`DKIM <6376>` to authenticate incoming emails
|
||||
Incoming emails must have a valid DKIM signature with
|
||||
Signing Domain Identifier (SDID, ``d=`` parameter in the DKIM-Signature
|
||||
header) equal to the ``From:`` header domain. This property is checked
|
||||
by OpenDKIM screen policy script before validating the signatures. This
|
||||
by filtermail when it verifies the signatures. This
|
||||
corresponds to strict :rfc:`DMARC <7489>` alignment (``adkim=s``).
|
||||
If there is no valid DKIM signature on the incoming email, the
|
||||
sender receives a “5.7.1 No valid DKIM signature found” error.
|
||||
After validating the DKIM signature,
|
||||
the `final.lua` script strips all ``OpenDKIM:`` headers to reduce message size on disc.
|
||||
|
||||
Note that chatmail relays
|
||||
|
||||
|
||||
+1
-1
@@ -35,4 +35,4 @@ you can also **scan this QR code** with Delta Chat:
|
||||
|
||||
🐣 **Choose** your Avatar and Name
|
||||
|
||||
💬 **Start** chatting with any Delta Chat contacts using [QR invite codes](https://delta.chat/en/help#howtoe2ee)
|
||||
💬 **Start** chatting with any Delta Chat contacts using [QR invite codes](https://delta.chat/help#howtoe2ee)
|
||||
|
||||
+2
-2
@@ -10,12 +10,12 @@ for the usage in chats, especially DeltaChat.
|
||||
### Rate and storage limits
|
||||
|
||||
- Un-encrypted messages are blocked to recipients outside
|
||||
{{config.mail_domain}} but setting up contact via [QR invite codes](https://delta.chat/en/help#howtoe2ee)
|
||||
{{config.mail_domain}} but setting up contact via [QR invite codes](https://delta.chat/help#howtoe2ee)
|
||||
allows your messages to pass freely to any outside recipients.
|
||||
|
||||
- You may send up to {{ config.max_user_send_per_minute }} messages per minute.
|
||||
|
||||
- You can store up to [{{ config.max_mailbox_size }} messages on the server](https://delta.chat/en/help#what-happens-if-i-turn-on-delete-old-messages-from-server).
|
||||
- You can store up to [{{ config.max_mailbox_size }} messages on the server](https://delta.chat/help#what-happens-if-i-turn-on-delete-old-messages-from-server).
|
||||
|
||||
- Messages are unconditionally removed latest {{ config.delete_mails_after }} days after arriving on the server.
|
||||
Earlier, if storage may exceed otherwise.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
Welcome to `{{config.mail_domain}}`, the default chatmail onboarding server for Delta Chat users.
|
||||
It is operated on the side by a small sysops team
|
||||
on a voluntary basis.
|
||||
See [other chatmail servers](https://delta.chat/en/chatmail) for alternative server operators.
|
||||
See [other chatmail servers](https://chatmail.at/relays) for alternative server operators.
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user