Prepare Coulobre v0.6.0 for migration and panel usability #87

Merged
parkel merged 5 commits from release/v0.6.0-rc.1 into main 2026-11-22 08:14:51 +01:00
3 changed files with 28 additions and 4 deletions
Showing only changes of commit db86430433 - Show all commits

No files matched your search

+6 -3
View File
@@ -792,9 +792,9 @@ sudo /opt/coulobre/bin/coulobre-mail-node restore-directadmin \
The importer supports both `imap/DOMAIN/LOCALPART/Maildir` and
`backup/DOMAIN/email/data/imap/LOCALPART/Maildir`. It restores regular
messages in `cur` and `new`, including Maildir++ folders, and preserves their
timestamps and filename flags. A selected message stored as a link blocks the
restore. Use a backup with regular message files or migrate that mailbox by
IMAP. Dovecot rebuilds its indexes. The importer checks the selected
timestamps and filename flags. A selected folder or message stored as a link
blocks the restore. Use a backup with regular files or migrate that mailbox
by IMAP. Dovecot rebuilds its indexes. The importer checks the selected
mailbox's quota and publishes only after the archive has been read. Both
an existing Maildir and an ambiguous source layout block publication.
[DirectAdmin's two IMAP backup layouts](https://docs.directadmin.com/changelog/version-1.50.0.html)
@@ -829,6 +829,9 @@ and the system mailbox in a nested home archive. Reissue TLS certificates
and rotate access using the provisioned Coulobre credentials. Verify the
website, database rows, mailbox folders, and published zone before cutover.
See [migration sources](migration-sources.md) for the assessment of cPanel
and Plesk account archives.
## Request an Apache configuration preview
Start RabbitMQ and set `COULOBRE_BROKER_URL` to its AMQP URL. The development
@@ -1,5 +1,7 @@
import gzip
import json
import os
import stat
from io import BytesIO, StringIO
from pathlib import Path
from tempfile import TemporaryDirectory
@@ -14,6 +16,7 @@ from coulobre.directadmin_dns import convert_zone
from coulobre.directadmin_mail import copy_mailbox_messages
from coulobre.directadmin_payload import copy_database_dump
from coulobre.mail_node import MailboxSpec
from coulobre.node_files import require_root_directory
from .models import DnsPublication, HostingAccount, HostingDnsZone
from .test_directadmin import make_tar
@@ -116,6 +119,19 @@ class DirectAdminPayloadTests(SimpleTestCase):
ZONE + '$INCLUDE "local-private-zone"\n', "example.net"
)
def test_node_directory_keeps_explicit_mode_under_restrictive_umask(self):
path = self.directory / "account"
with patch("coulobre.node_files.check_root_directory"):
previous = os.umask(0o077)
try:
require_root_directory(path, create_mode=0o755)
finally:
os.umask(previous)
self.assertEqual(stat.S_IMODE(path.stat().st_mode), 0o755)
path.chmod(0o750)
require_root_directory(path, create_mode=0o755)
self.assertEqual(stat.S_IMODE(path.stat().st_mode), 0o750)
class DirectAdminZoneTests(TestCase):
def setUp(self):
+6 -1
View File
@@ -9,7 +9,12 @@ def require_root_directory(path, *, create_mode=None):
for parent in reversed(path.parents):
check_root_directory(parent)
if create_mode is not None:
path.mkdir(mode=create_mode, exist_ok=True)
try:
path.mkdir(mode=create_mode)
except FileExistsError:
pass
else:
path.chmod(create_mode)
check_root_directory(path)