Commit Graph

1056 Commits

Author SHA1 Message Date
cliffmccarthy d1788b7c65 refactor: Add MtailDeployer
- This splits the existing deploy_mtail() routine into methods for the
  install, configure, and activate stages.
2025-11-08 10:16:35 -06:00
cliffmccarthy 84ab4bb6b8 refactor: Add AcmetoolDeployer
- This splits the existing deploy_acmetool() routine into methods for
  the install, configure, and activate stages.
2025-11-08 10:16:35 -06:00
cliffmccarthy 04451ad537 refactor: Add JournaldDeployer 2025-11-08 10:16:35 -06:00
cliffmccarthy d09a118e54 refactor: Add IrohDeployer
- This splits the existing deploy_iroh_relay() routine into methods
  for the install, configure, and activate stages.
2025-11-08 10:16:35 -06:00
cliffmccarthy 5b982a3b0f refactor: Add UnboundDeployer 2025-11-08 10:16:35 -06:00
cliffmccarthy 71636b8250 refactor: Add OpendkimDeployer
- Note that this moves the installation of the opendkim package
  earlier in the deployment sequence.  Previously, it was installed
  during the _configure_opendkim() routine.
2025-11-08 10:16:35 -06:00
cliffmccarthy e7df1a43a3 refactor: Add NginxDeployer
- Use policy-rc.d during nginx install.  This is needed to keep nginx
  from starting up and interfering with acmetool.  For more information see:
    - https://serverfault.com/questions/861583/how-to-stop-nginx-from-being-automatically-started-on-install
    - https://major.io/p/install-debian-packages-without-starting-daemons/
    - https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt
2025-11-08 10:16:35 -06:00
cliffmccarthy cfc94a37b3 refactor: Add PostfixDeployer
- Removed now-unused 'debug' variable from deploy_chatmail().
2025-11-08 10:16:35 -06:00
cliffmccarthy 22b77168ed refactor: Add DovecotDeployer 2025-11-08 10:16:35 -06:00
cliffmccarthy ffcd657a88 refactor: Add Deployer base class
- Added a Deployer class that defines the base for objects that will
  handle installation of individual components, with install,
  configure, and activate stages.  Subclasses will override the
  implementation methods of those stages as needed, while the base
  class handles all the logic of deciding which stages to execute.
- The CMDEPLOY_STAGES environment variable is used to determine what
  stages to run.  If this is not defined, all stages run as usual.
- Added import of Deployer to cmdeploy/__init__.py.  This is not yet
  used, but the next series of commits will use it.
- In deploy_chatmail(), define an empty list of deployers, and call
  the create_groups() and create_users() methods for the items in the
  list.  This list will get filled with Deployer objects in the next
  series of commits.
2025-11-08 10:16:35 -06:00
cliffmccarthy 39fd04473c refactor: Move addition of 9.9.9.9 resolver earlier
- Moved the "Add 9.9.9.9 to resolv.conf" step earlier, before the
  creation of users or updates to any config files.  This should not
  affect any of those operations.  Moving this step earlier makes it
  easier to accommodate the restructuring of the deployment process
  into separate components with separate stages for install,
  configure, and activate.
2025-11-08 10:16:35 -06:00
cliffmccarthy 49613f7e71 refactor: Move all imports to top of cmdeploy/__init__.py 2025-11-08 10:16:35 -06:00
missytake ded9dd470d www: add changelog 2025-11-06 16:19:02 +01:00
Alexander b94ad729fd Update cmdeploy/src/cmdeploy/__init__.py
Co-authored-by: missytake <missytake@systemli.org>
2025-11-06 16:17:12 +01:00
Alexander Dietrich b60267f37f Skip www_folder if merge conflict marker found 2025-11-06 16:17:12 +01:00
missytake a0aa2912dd ci: fix test methods for deltachat 2.23.0 2025-11-06 12:33:59 +01:00
Serge Matveenko 76108c1c03 Test dig output with dns comments 2025-11-06 11:26:02 +01:00
Serge Matveenko 61b8dc4637 Improve dns responses parsing 2025-11-06 11:26:02 +01:00
Lars-Dominik Braun d42f579291 turnserver: Strip newline from response. 2025-11-03 22:57:43 +00:00
Serge Matveenko dd3cf4d449 Update dovecot-core deb sha256 sums 2025-10-30 11:23:19 +01:00
holger krekel 7361cc9350 fix changelog references 2025-10-29 13:33:25 +01:00
missytake 00f199816d unpublish mutual help group invite link 2025-10-28 16:12:07 +01:00
link2xt 8d7e1dad0e Require STARTTLS for incoming port 25 connections
We already require that outgoing connections
use STARTTLS so other servers need a valid TLS
certificate to accept messages from us.
It is then very unlikely that they cannot use TLS
to send messages to us.

Conversely, if they only can send messages to use without TLS,
it likely does not have STARTLS on its port 25
and then we don't want to accept messages from them
because we will likely not be able to reply.
2025-10-28 01:44:14 +00:00
link2xt c0da7bb3bf docs: chatmail-turn listens on 3478 UDP, not TCP port 2025-10-28 01:08:06 +00:00
holger krekel 863ded6480 try to limit index cache max size 2025-10-28 01:42:37 +01:00
missytake d75321b355 doc: write down some basic infos on chatmail-turn (#693)
Co-authored-by: l <link2xt@testrun.org>
2025-10-27 09:00:07 +01:00
link2xt 9148b16d81 acmetool: use ECDSA keys instead of RSA 2025-10-25 08:00:31 +00: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
link2xt 0155f32df6 Require TLS 1.2 for outgoing SMTP connections 2025-10-22 02:46:29 +00:00
holger krekel 9ddd5d8b2b Replace expiry "find" commands with a new chatmaild.expire python module + a reporting one 2025-10-21 20:50:46 +00:00
missytake 4cfe228a1f filtermail: further optimize check_armored_payload() 2025-10-21 00:57:27 +02:00
holger krekel 741a20450c Add a system test for running the filtermail module 2025-10-20 19:02:14 +00:00
adb b7fadcd4be filtermail: improve check_armored_payload() (#679) 2025-10-20 09:55:53 +02:00
missytake 7db26f33d9 nginx: be more specific with the server name (#636) 2025-10-19 14:02:41 +02:00
link2xt 2b90f7db37 filtermail: run CPU-intensive handle_DATA in a thread pool executor
See
<https://docs.python.org/3/library/asyncio-eventloop.html#executing-code-in-thread-or-process-pools>
for the documentation.

This should avoid processing of large messages from hogging asyncio
thread and delaying async operations like accepting new connections.
2025-10-19 10:43:11 +00:00
holger krekel e37dd5153a remove logging and just print to sys.stderr 2025-10-18 19:50:13 +00:00
missytake f21e4ff55b opendkim: increase DNSTimeout from 5 (default) to 60
fix #667
2025-10-17 11:27:18 +02:00
cliffmccarthy 21258a267a test: Handle Git errors in test_deployed_state()
- This is a counterpart to pull request #607.  Revised
  test_deployed_state() to perform the same error-handling on Git
  commands that cmdeploy does.  If 'git rev-parse' returns an error,
  the value "unknown" is used.  If 'git diff' returns an error, the
  null string is used.
- This fixes failures in environments where Git is not installed or
  where the .git subdirectory is not present (as long as the server
  was deployed in the same way).
2025-10-16 16:15:35 +02:00
missytake e7ddf6dc32 cmdeploy: make --ssh-host expect '@docker' instead of 'docker' 2025-10-14 22:27:02 +02:00
missytake e3c77a5b37 cmdeploy: introduce LocalExec object 2025-10-14 22:27:02 +02:00
missytake 8256080ad1 Revert "tests: first attempt to mock shell() call"
This reverts commit a0c632a7006a83c8b39cff86228296c32c5c5b9e.
2025-10-14 22:27:02 +02:00
missytake 248b225665 tests: first attempt to mock shell() call 2025-10-14 22:27:02 +02:00
missytake 79591adca4 cmdeploy: prepare for being able to run commands in docker containers 2025-10-14 22:27:02 +02:00
missytake 185757cf40 tests: disable failing stderr capturing in test_logged for now 2025-10-14 22:27:02 +02:00
missytake 87a3adec03 cmdeploy: allow to run SSH commands locally
fix #604
related to #629
pulled out of https://github.com/Keonik1/relay/pull/3
2025-10-14 22:27:02 +02:00
cliffmccarthy 4f5719f590 test: Add retries to test_rewrite_subject() (#670)
- test_rewrite_subject() is prone to failure when it checks for the
  delivered message, because fetch_all_messages() raises "ValueError:
  no messages in imap folder".  The check has the potential to happen
  before the server has had a chance to deliver the message to the
  user's inbox.
- Added a function try_n_times() that attempts to call a function the
  specified number of times, with a 1-second sleep between calls.  The
  call is retried until it doesn't raise an exception.  The last call
  is made without a 'try' block, so that the final exception passes
  through to the caller if it does not return.
- Wrapped call to fetch_all_messages() in try_n_times(), with 5
  attempts specified.  This should usually allow enough time for the
  message to get moved from the postfix queue to the user's inbox.
2025-10-14 21:18:15 +02:00
cliffmccarthy 9787b63cbb test: Return None for success in test_timezone_env() (#671)
- test_timezone_env() is producing the warning,
  "PytestReturnNotNoneWarning: Test functions should return None, but
  src/cmdeploy/tests/online/test_1_basic.py::test_timezone_env
  returned <class 'bool'>".
- Revised test_timezone_env() to return None for success instead of
  True.
2025-10-14 21:17:56 +02:00
missytake 6f600fa329 config: add www_folder to default config (#634) 2025-10-14 21:17:08 +02:00
missytake 20b6e0c528 www: chown /var/www/html to www-data 2025-10-14 21:16:49 +02:00
missytake 262e98f0ba filtermail: allow Version comment in incoming PGP messages (#655)
fix #616

* filtermail: accept any Version comment in incoming messages
2025-10-14 19:15:13 +02:00