From c5178b1c74fa7c918ebe29622c9e1a3b7baeb1ce Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Sun, 10 Aug 2025 11:33:23 +0200 Subject: [PATCH] wip --- bundles/dovecot/files/dovecot.conf | 80 +++++++++++++++++------------- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/bundles/dovecot/files/dovecot.conf b/bundles/dovecot/files/dovecot.conf index 95871f5..5e3f45c 100644 --- a/bundles/dovecot/files/dovecot.conf +++ b/bundles/dovecot/files/dovecot.conf @@ -12,7 +12,7 @@ ssl_client_ca_dir = /etc/ssl/certs mail_driver = maildir mail_path = ${maildir}/%{user} mail_index_path = ${maildir}/index/%{user} -mail_plugins = fts fts_xapian +mail_plugins = fts fts_flatcurve namespace inbox { inbox = yes @@ -35,6 +35,7 @@ namespace inbox { } } +# postgres passdb userdb sql_driver = pgsql @@ -47,8 +48,6 @@ pgsql main { } } -# postgres passdb userdb - passdb sql { passdb_default_password_scheme = ARGON2ID @@ -105,8 +104,7 @@ service stats { } } service managesieve-login { - inet_listener sieve { - } + #inet_listener sieve {} process_min_avail = 0 process_min_avail = 1 process_limit = 1 @@ -117,25 +115,41 @@ service managesieve { } protocol imap { - mail_plugins = $mail_plugins imap_sieve - mail_max_userip_connections = 50 - imap_idle_notify_interval = 29 mins + mail_plugins = $mail_plugins imap_sieve + mail_max_userip_connections = 50 + imap_idle_notify_interval = 29 mins } protocol lmtp { - mail_plugins = $mail_plugins sieve + mail_plugins = $mail_plugins sieve } -protocol sieve { - sieve = /var/vmail/sieve/%u.sieve - sieve_storage = /var/vmail/sieve/%u/ + +# Persönliches Skript (deine alte Datei /var/vmail/sieve/%u.sieve) +sieve_script personal { + driver = file + # Verzeichnis mit (evtl. mehreren) Sieve-Skripten des Users + path = /var/vmail/sieve/%{user}/ + # Aktives Skript (entspricht früher "sieve = /var/vmail/sieve/%u.sieve") + active_path = /var/vmail/sieve/%{user}.sieve +} + +# Globales After-Skript (dein früheres "sieve_after = …") +sieve_script after { + type = after + driver = file + path = /var/vmail/sieve/global/spam-to-folder.sieve } # fulltext search -fts = xapian -fts_xapian = partial=3 full=20 verbose=0 +fts flatcurve { + # substring_search = yes # RFC-konform = yes, braucht aber deutlich mehr Platz + # rotate_count = 5000 # DB-Rotation nach X Mails + # rotate_time = 5s # oder zeitbasiert rotieren + # optimize_limit = 10 + # min_term_size = 3 +} fts_autoindex = yes -fts_enforced = yes -# Index attachements -fts_decoder = decode2text +fts_decoder_driver = script +fts_decoder_script_socket_path = decode2text service indexer-worker { vsz_limit = ${indexer_ram} @@ -148,22 +162,20 @@ service decode2text { } } -# spam filter -sieve_plugins = sieve_imapsieve sieve_extprograms -sieve_dir = /var/vmail/sieve/%u/ -sieve = /var/vmail/sieve/%u.sieve -sieve_pipe_bin_dir = /var/vmail/sieve/bin -sieve_extensions = +vnd.dovecot.pipe +## # spam filter +## sieve_plugins = sieve_imapsieve sieve_extprograms +## sieve_dir = /var/vmail/sieve/%u/ +## sieve = /var/vmail/sieve/%u.sieve +## sieve_pipe_bin_dir = /var/vmail/sieve/bin +## sieve_extensions = +vnd.dovecot.pipe -sieve_after = /var/vmail/sieve/global/spam-to-folder.sieve +## # From elsewhere to Spam folder +## imapsieve_mailbox1_name = Junk +## imapsieve_mailbox1_causes = COPY +## imapsieve_mailbox1_before = file:/var/vmail/sieve/global/learn-spam.sieve -# From elsewhere to Spam folder -imapsieve_mailbox1_name = Junk -imapsieve_mailbox1_causes = COPY -imapsieve_mailbox1_before = file:/var/vmail/sieve/global/learn-spam.sieve - -# From Spam folder to elsewhere -imapsieve_mailbox2_name = * -imapsieve_mailbox2_from = Junk -imapsieve_mailbox2_causes = COPY -imapsieve_mailbox2_before = file:/var/vmail/sieve/global/learn-ham.sieve +## # From Spam folder to elsewhere +## imapsieve_mailbox2_name = * +## imapsieve_mailbox2_from = Junk +## imapsieve_mailbox2_causes = COPY +## imapsieve_mailbox2_before = file:/var/vmail/sieve/global/learn-ham.sieve