Commit Graph
100 Commits
Author SHA1 Message Date
holger krekelandj4n 3d6ff8122e remove tls extrernal test file, it's too large, and should only be added if we can run it from work flows 2026-03-05 15:39:48 +01:00
holger krekelandj4n 17961e1bf7 revert pure whitespace chagnes 2026-03-05 15:39:48 +01:00
holger krekelandj4n b30acabcfb addressed link2xt comments except tls cleanup and fixed linting, removed leftovers 2026-03-05 15:39:48 +01:00
holger krekelandj4n 0ae2c19dab feat: support externally managed TLS via tls_external_cert_and_key option
Adds a new tls_external_cert_and_key config option for chatmail servers
that manage their own TLS certificates (e.g. via an external ACME client
or a load balancer).

A systemd path unit (tls-cert-reload.path) watches the certificate file
via inotify and automatically reloads dovecot and nginx when it changes.
Postfix reads certs per TLS handshake so needs no reload.

Also extracts openssl_selfsigned_args() so cert generation parameters
are shared between SelfSignedTlsDeployer and the e2e test.
2026-03-05 15:39:48 +01:00
holger krekel e21f2a0fa2 feat: support externally managed TLS via tls_external_cert_and_key option (#860)
Adds a new tls_external_cert_and_key config option for chatmail servers
that manage their own TLS certificates (e.g. via an external ACME client
or a load balancer).

A systemd path unit (tls-cert-reload.path) watches the certificate file
via inotify and automatically reloads dovecot and nginx when it changes.
Postfix reads certs per TLS handshake so needs no reload.

Also extracts openssl_selfsigned_args() so cert generation parameters
are shared between SelfSignedTlsDeployer and the e2e test.
2026-02-24 09:46:38 +01:00
holger krekelandGitHub 8ca0909fa5 cleanup: remove CFFI deltachat bindings usage, and consolidate test support with rpc-bindings (#872)
* cleanup: remove CFFI deltachat bindings usage, and consolidate test support with rpc-bindings

major simplification: all chatmail fixtures used in the test are now created inside the cmdeploy plugin,
and do not inherit anything from other fixture machineries, let alone the legacy deltachat CFFI ones.
also fix that pytest report headers show correct chatmail domains under test
2026-02-24 08:27:56 +01:00
holger krekel 7b5b180b4b refactor(benchmark): move rate-limit cooldown to benchmark fixture 2026-02-22 18:26:15 +01:00
holger krekelandGitHub cf96be2cbb feat: support self-signed chatmail relays (#855)
feat: support self-signed TLS via underscore domain convention
Domains starting with "_" (e.g. _chat.example.org) automatically use
self-signed TLS certificates instead of ACME/Let's Encrypt. The TLS
mode is derived from the domain name — no separate config option needed.

Internally, when config.tls_cert_mode is "self" (underscore domain):
- Generate self-signed certificates via openssl
- Set Postfix smtp_tls_security_level to "encrypt" (opportunistic TLS)
- Add smtp_tls_policy_map entry for underscore domains
- Skip ACME, MTA-STS and www CNAME checks in `cmdeploy dns`
- Serve /new via GET (not redirect to dcaccount:) with rate-limiting
  (nginx limit_req, 2r/s burst=5)
- Return dclogin: URLs with ic=3 (AcceptInvalidCertificates) from /new
- Render QR codes client-side via JavaScript and qrcode-svg
- Use config.tls_cert_path/tls_key_path in Postfix, Dovecot and nginx
  templates instead of hardcoded ACME paths
2026-02-19 10:27:41 +01:00
holger krekelandmissytake 6401bbb32c fix: properly make sure that postfix gets restarted on failure 2026-01-15 12:51:29 +01:00
holger krekelandGitHub 0e7ab96dc8 docs: use "build machine" and "deployment server" consistently in getting-started (#797) 2026-01-04 15:05:09 +01:00
99630e4d1b docs: streamline migration guide wording, provide titled steps (#789)
* docs: update migration guide after nine migration

* use $OLD_IP4 and $NEW_IP4 to make docs more readable. Also streamline "set TTL to 5 minute" phrasing a bit.

* fix tar commands

* refactor: streamline and refactor the migration guide to provide more clarity and focus

* recommend a "higher TTL" concrete value

Co-authored-by: missytake <missytake@systemli.org>

* scriptify another location

---------

Co-authored-by: missytake <missytake@systemli.org>
2025-12-27 13:10:56 +01:00
holger krekel f04a624e19 fix: use absolute path instead of relative path, and streamline some code parts according to comments at https://github.com/chatmail/relay/pull/785 2025-12-18 23:31:39 +01:00
holger krekel 24e3f33acd fix: expire messages also from DeltaChat IMAP subfolders 2025-12-18 23:04:50 +01:00
holger krekel abe0cb5d08 address cliff's comments about dovecot/postfix 2025-12-17 16:21:40 +01:00
holger krekel b000213c68 remove echobot from relay deployment and make sure it's un-installed during "cmdeploy run" 2025-12-07 20:14:35 +01:00
holger krekel 6b7c002e24 use non-underscore naming for basedeploy helpers 2025-11-16 19:53:54 +01:00
holger krekel 4b2f98788d remove unneeded __init__ files 2025-11-16 19:53:54 +01:00
holger krekel 13faa42abd shift mtail deployer to subdir 2025-11-16 19:53:54 +01:00
holger krekel 7c12136991 move out nginx deployer 2025-11-16 19:53:54 +01:00
holger krekel 3637bba5dc move dovecot deployer out to dovecot/ directory 2025-11-16 19:53:54 +01:00
holger krekel e2b157bd96 move postfix deployer to postfix directory 2025-11-16 19:53:54 +01:00
holger krekel 83abb3a3e1 factor out opendkim deployer 2025-11-16 19:53:54 +01:00
holger krekelandmissytake 7b16f1330d Update doc/source/overview.rst
Co-authored-by: missytake <missytake@systemli.org>
2025-11-13 21:03:54 +01:00
holger krekel 7a907b138c fix heading 2025-11-13 21:03:54 +01:00
holger krekel 0ff0159a89 update mermaid overview graph 2025-11-13 21:03:54 +01:00
holger krekel 81d2bf89c7 move all cleanup of historic artifacts into LegacyRemoveDeployer 2025-11-13 21:03:30 +01:00
holger krekel fc7240a1ad simplify importing of resource files (avoid importlib.resources.files boilerplate) 2025-11-13 18:59:03 +01:00
holger krekel bdcccd858c add a comment about absolute imports 2025-11-13 18:59:03 +01:00
holger krekel af30d2b55d fix import to work with "pyinfra" which needs a file location and thus does not start "run.py" as part of the package 2025-11-13 18:59:03 +01:00
holger krekel 5664b97db4 fixing path resolution for "fmt" command 2025-11-13 18:59:03 +01:00
holger krekel 81364bd523 fix an import 2025-11-13 18:59:03 +01:00
holger krekel 3c3e54fceb apply results of "cmdeploy fmt" 2025-11-13 18:59:03 +01:00
holger krekel ae96b752a3 rename "deployer.py" to "basedeploy.py" 2025-11-13 18:59:03 +01:00
holger krekel 33b69fac95 move the monster __init__.py to a deployers.py file 2025-11-13 18:59:03 +01:00
holger krekel 165dc10f59 avoid "deploy.py" next to "deployer.py" 2025-11-13 18:59:03 +01:00
50b986a265 Split README into sphinx doc structured sections (#711)
refactor README.rst and architecture file into sphinx doc project, automatically deploying on main merges and PRs.

* add FAQs from https://chatmail.at/relays landing page

* fix links, and streamline postfix/dovecot mentioning

* add linkcheck to CI, fix several links and streamlihne DKIM section while at it

* some streamlining, rename to "overview"

* ci: upload documentation to chatmail.at/doc/relay

* ci: main should be uploaded when docs.yaml changes

* ci: fix typo

* Update .github/workflows/docs-preview.yaml

Co-authored-by: missytake <missytake@systemli.org>
2025-11-11 14:49:25 +01:00
holger krekel 7361cc9350 fix changelog references 2025-10-29 13:33:25 +01:00
holger krekel 863ded6480 try to limit index cache max size 2025-10-28 01:42:37 +01:00
holger krekel fa9aa5b015 guard expire/fsreport file iteration against vanishing, improve reporting
also activates actual deletion (after quite some dry test runs on nine)
2025-10-22 20:30:12 +02:00
holger krekelandlink2xt 9ddd5d8b2b Replace expiry "find" commands with a new chatmaild.expire python module + a reporting one 2025-10-21 20:50:46 +00:00
holger krekelandGitHub 741a20450c Add a system test for running the filtermail module 2025-10-20 19:02:14 +00:00
holger krekelandl e37dd5153a remove logging and just print to sys.stderr 2025-10-18 19:50:13 +00:00
holger krekel 8a59d94105 Update notifier.py docs
Update to current status and naming
2025-06-27 11:08:31 +02:00
holger krekel 71160b8f65 fix timezone handling such that client/server do not need to have the same 2025-04-10 17:55:16 +02:00
holger krekel 9f74d0a608 cleanly time out trying to connect to port 25 and treat failure as "skip" not real failure. 2025-04-10 17:09:20 +02:00
holger krekelandmissytake 3cc9bc3ceb avoid initial runs to show acmetool not found errors 2025-04-09 17:41:38 +02:00
holger krekel 5ba99dc782 shorten first title to fit in one line in default layout 2025-04-02 16:41:01 +02:00
holger krekelandGitHub 6d898d5431 use "relay" instead of "server" in most places, and "address" instead of "account" (#539)
* use "relay" instead of "server" and "address" instead of "account"

* consistent Dovecot capitalization and striking relay in two places

* address missytake's comments: use "chatmail relay servers" sometimes -- it's still fine to talk about relays being, or running on, servers
2025-04-02 16:23:23 +02:00
holger krekel fc3fb93432 use default config files for any missing ini setting 2025-04-02 08:48:45 +02:00
c4f0146e16 Reject unencrypted incoming mail (#538)
* draft blocking of incoming non-encrypted mail

* create a new enforceE2EE file in address dirs by default and only accept incoming cleartext file if the enforceE2EE file is missing

* Update cmdeploy/src/cmdeploy/service/filtermail.service.f

Co-authored-by: l <link2xt@testrun.org>

* fix benchmark so they setup encryption

* hack around limitations of aiosmtpd's handliung of RCPTO options

* add tests, and split incoming/outgoing handlers for clarity

* document mailbox directory structure, some streamlining of features/E2EE in intro

* use SMTP response code "523 Encryption Needed"

* filtermail: care for the case that the recipient does not exist


Co-authored-by: missytake <missytake@systemli.org>

* Update chatmaild/src/chatmaild/filtermail.py

Co-authored-by: l <link2xt@testrun.org>

* Update chatmaild/src/chatmaild/filtermail.py

Co-authored-by: l <link2xt@testrun.org>

* remove debug info print

* ensure multipart/report type for mailer-daemon messages

* Allow sending out Autocrypt Setup Messages

---------

Co-authored-by: l <link2xt@testrun.org>
Co-authored-by: missytake <missytake@systemli.org>
2025-04-01 20:52:43 +02:00
holger krekelandGitHub 194030a456 enforce encryption for in-server mails (#535)
* enforce encryption for in-server mails

* make tests work with chatmail server only support e2ee internally

* fix echobot test

* simplify quota-exceeded test

* work around rpc-server fixture changes
2025-03-29 21:22:26 +01:00
holger krekel ce240083c4 fix test and streamline impl 2025-03-27 18:00:09 +01:00
holger krekel 31faf2c78e remove Delta Chat mentionings 2025-03-21 21:47:24 +01:00
holger krekel f8c28d8b9f clarify client/server setup for deploying a chatmail server 2025-03-21 21:41:51 +01:00
holger krekel f69a2355f6 better prerequisites 2025-03-21 21:40:05 +01:00
holger krekel 388c01105c streamline intro/getting started 2025-03-21 21:36:26 +01:00
holger krekelandbjoern f8996e1d7d Update README.md
Co-authored-by: bjoern <r10s@b44t.com>
2025-03-21 20:32:38 +01:00
holger krekelandbjoern 6b3d5025d9 Update README.md
Co-authored-by: bjoern <r10s@b44t.com>
2025-03-21 20:32:38 +01:00
holger krekel ed271189d2 trim the feature list 2025-03-21 20:32:38 +01:00
holger krekel 65f8a9a652 provide more summary info/perequisites in the README 2025-03-21 20:32:38 +01:00
holger krekelandl 6c5b9fde1f Update README.md
Co-authored-by: l <link2xt@testrun.org>
2025-03-21 06:50:17 +01:00
holger krekel 258436442f rework intro to read when coming from chatmail.at 2025-03-21 06:50:17 +01:00
holger krekelandmissytake fe51dbd844 streamline 2024-10-31 17:30:09 +01:00
holger krekelandmissytake 99fbe1d4c4 Apply suggestions from code review
Co-authored-by: missytake <missytake@systemli.org>
2024-10-31 17:30:09 +01:00
holger krekelandmissytake d3e71aa394 streamline intro, mention IP addresses 2024-10-31 17:30:09 +01:00
holger krekel 72df078d02 add support for specifying whole domains for passthrough 2024-10-30 17:17:08 +01:00
holger krekelandmissytake af17b459ba also change privacy policy to circumscribe iroh-relay services 2024-10-30 13:30:44 +01:00
holger krekel 48fdff6700 fix wrong ref in changelog 2024-10-23 13:49:46 +02:00
holger krekel 3ef45c2ffd add changelog entry for #405 2024-09-02 23:02:34 +02:00
holger krekel 8d72d770a3 don't rename import as link2xt prefers 2024-09-02 23:01:28 +02:00
holger krekel e32d81520a use "walrus" operator (didn't know about it, doh!) 2024-09-02 23:01:28 +02:00
holger krekel e973bc1f41 organize remotely executing functions in "cmdeploy.remote" sub package 2024-09-02 23:01:28 +02:00
holger krekel cdfce25494 add a note on deletion of accounts 2024-09-02 19:40:42 +02:00
holger krekel 7aa876a0bb remove dysfunct hispanilandia ref 2024-08-09 00:05:56 +02:00
holger krekel dee36638cf fix #399 2024-08-09 00:02:34 +02:00
holger krekel effd5bc6e9 upgrade debian packages on "cmdeploy run" 2024-08-02 13:30:36 +02:00
holger krekel 29eabba5a0 fix links 2024-08-01 19:22:37 +02:00
holger krekel e7a9bf2a6c start more changes 2024-07-31 22:01:20 +02:00
holger krekel 93423ee1d1 make another release 2024-07-31 21:59:55 +02:00
holger krekel 888f7e669a simplify handle_set method for dictproxy subclasses 2024-07-31 21:51:35 +02:00
holger krekel a7101be284 introduce imap_rawlog option for debugging 2024-07-31 02:01:06 +02:00
holger krekel 3ee0b7e288 fix #385 2024-07-30 17:37:33 +02:00
holger krekel fae0863633 make disable_ipv6 optional (and default to false) to not break existing chatmail.ini's unneccessarily 2024-07-28 20:38:53 +02:00
holger krekel ac1f2dadad introduce max_message_size config option 2024-07-28 19:51:05 +02:00
holger krekel 4858a67be1 run filtermail as dedicated user 2024-07-28 19:02:22 +02:00
holger krekel 1238ed95da remove mailboxes_dir as default option 2024-07-28 18:17:10 +02:00
holger krekel b32a57105d remove "passdb_path" as default option 2024-07-28 18:17:10 +02:00
holger krekel 87d6d2d5cb shift code around a bit and add changelog 2024-07-28 17:13:32 +02:00
holger krekel 1f96334f8e add changelog 2024-07-28 16:30:34 +02:00
holger krekel 89c65d30d3 remove debug log 2024-07-28 11:19:03 +02:00
holger krekel c4499d6c85 remove neccessity for FileLock on set_password 2024-07-28 11:12:00 +02:00
holger krekel 29888c2f03 create mailboxes parent directories if needed 2024-07-28 11:12:00 +02:00
holger krekel eaff92cebc don't use filelocks for writing password because there only is a single doveauth process anyway 2024-07-28 11:12:00 +02:00
holger krekel 4f4fd6a90c log error when a transaction id is not there 2024-07-28 11:12:00 +02:00
holger krekel da3eb89b67 try debug a CI failure 2024-07-28 11:12:00 +02:00
holger krekel 765f081f6f refactor password/login-timestamp handling into a User object 2024-07-28 11:12:00 +02:00
holger krekel 5c87d69d46 simplify get_user_maildir 2024-07-28 11:12:00 +02:00
holger krekel 686f32d6b3 implement and test migration from sqlite to storing password in userdir 2024-07-28 11:12:00 +02:00
holger krekel 68a62537e1 merge lastlogin and doveauth logic to use the "password" file for both states 2024-07-28 11:12:00 +02:00
holger krekel e3ff82544a shift lookup methods to class for consistency 2024-07-28 11:12:00 +02:00