From 27171bcd4c78598b64a16122e81e9d72a77c813a Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Sun, 10 Aug 2025 14:31:34 +0200 Subject: [PATCH] wip --- bundles/dovecot/files/dovecot.conf | 6 +++--- bundles/dovecot/items.py | 2 ++ bundles/roundcube/files/config.inc.php | 12 +++++------- bundles/roundcube/items.py | 1 + nodes/htz.mails.py | 1 + 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/bundles/dovecot/files/dovecot.conf b/bundles/dovecot/files/dovecot.conf index d7a3177..bfcfb74 100644 --- a/bundles/dovecot/files/dovecot.conf +++ b/bundles/dovecot/files/dovecot.conf @@ -3,7 +3,6 @@ dovecot_storage_version = ${storage_version} protocols = imap lmtp sieve auth_mechanisms = plain login -mail_privileged_group = mail ssl = required ssl_server_cert_file = /var/lib/dehydrated/certs/${hostname}/fullchain.pem ssl_server_key_file = /var/lib/dehydrated/certs/${hostname}/privkey.pem @@ -147,7 +146,7 @@ language de { language_tokenizers = generic email-address fts flatcurve { - # substring_search = yes # RFC-konform = yes, braucht aber deutlich mehr Platz + substring_search = yes # rotate_count = 5000 # DB-Rotation nach X Mails # rotate_time = 5s # oder zeitbasiert rotieren # optimize_limit = 10 @@ -159,7 +158,8 @@ fts_decoder_driver = script fts_decoder_script_socket_path = decode2text service indexer-worker { - vsz_limit = ${indexer_ram} + process_limit = ${indexer_cores} + vsz_limit = ${indexer_ram}M } service decode2text { executable = script /usr/local/libexec/dovecot/decode2text.sh diff --git a/bundles/dovecot/items.py b/bundles/dovecot/items.py index 7ea127c..daf1429 100644 --- a/bundles/dovecot/items.py +++ b/bundles/dovecot/items.py @@ -52,6 +52,8 @@ files = { 'db_name': node.metadata.get('mailserver/database/name'), 'db_user': node.metadata.get('mailserver/database/user'), 'db_password': node.metadata.get('mailserver/database/password'), + 'indexer_cores': node.metadata.get('vm/cores'), + 'indexer_ram': node.metadata.get('vm/ram')//2, }, 'needs': { 'pkg_apt:' diff --git a/bundles/roundcube/files/config.inc.php b/bundles/roundcube/files/config.inc.php index 8ab67d1..c4bba77 100644 --- a/bundles/roundcube/files/config.inc.php +++ b/bundles/roundcube/files/config.inc.php @@ -7,18 +7,16 @@ $config['enable_installer'] = true; /* Local configuration for Roundcube Webmail */ $config['db_dsnw'] = '${database['provider']}://${database['user']}:${database['password']}@${database['host']}/${database['name']}'; -$config['imap_host'] = 'localhost'; +$config['imap_host'] = 'ssl://${imap_host}'; +$config['imap_port'] = 993; $config['smtp_host'] = 'tls://localhost'; +$config['smtp_port'] = 587; $config['smtp_user'] = '%u'; $config['smtp_pass'] = '%p'; +#$config['imap_debug'] = true; +#$config['smtp_debug'] = true; $config['support_url'] = ''; $config['des_key'] = '${des_key}'; $config['product_name'] = '${product_name}'; $config['plugins'] = array(${', '.join(f'"{plugin}"' for plugin in plugins)}); $config['language'] = 'de_DE'; -$config['smtp_conn_options'] = array( - 'ssl' => array( - 'verify_peer' => false, - 'verify_peer_name' => false, - ), -); diff --git a/bundles/roundcube/items.py b/bundles/roundcube/items.py index cbe8487..8a8e1cc 100644 --- a/bundles/roundcube/items.py +++ b/bundles/roundcube/items.py @@ -61,6 +61,7 @@ files['/opt/roundcube/config/config.inc.php'] = { 'des_key': node.metadata.get('roundcube/des_key'), 'database': node.metadata.get('roundcube/database'), 'plugins': node.metadata.get('roundcube/plugins'), + 'imap_host': node.metadata.get('mailserver/hostname'), }, 'needs': [ 'action:chown_roundcube', diff --git a/nodes/htz.mails.py b/nodes/htz.mails.py index 02701d8..66ba5f4 100644 --- a/nodes/htz.mails.py +++ b/nodes/htz.mails.py @@ -18,6 +18,7 @@ #'nginx-rtmps', 'wireguard', 'zfs', + 'systemd-swap', ], 'metadata': { 'id': 'ea29bdf0-0b47-4bf4-8346-67d60c9dc4ae',