For the sake of simplicity and in the intent to be useful for others, here where I get with my config (using Sieve, FTS Xapian, LMTP, and mySQL user/passdb
Any corrections ?
dovecot_config_version = 2.4.0 dovecot_storage_version = 2.4.0
base_dir = /run/dovecot state_dir = /var/lib/dovecot default_login_user = dovecot
listen = * ::
verbose_proctitle = yes
mail_gid = mail mail_uid = mailusers mail_driver = mdbox mail_path = /data/mails/%{user | domain }/%{user | username }
mail_plugins = fts fts_xapian # mail_debug = yes # mail_cache_max_size = 128M
ssl_cert = </etc/letsencrypt/live/gjnet/fullchain.pem ssl_key = </etc/letsencrypt/live/gjnet/privkey.pem ssl_dh = </etc/mail/dovecot/dh.pem
mdbox_rotate_size = 64M
default_vsz_limit = 0
sendmail_path = /usr/sbin/sendmail
sql_driver = mysql
mysql localhost { user = services password = MYPASSWORD dbname = services }
plugin { plugin = fts_xapian managesieve sieve
fts = xapian
fts_xapian = verbose=0
fts_autoindex = yes
fts_enforced = yes
fts_autoindex_exclude = \Trash
fts_autoindex_exclude2 = \Drafts
# fts_decoder = decode2text
sieve = file:/data/mails/%{user | domain }/%{user | username
}/sieve/;active=/data/mails/%d/%n/sieve/default.sieve sieve_after = file:/data/mails/sieve/after.sieve sieve_default = file:/data/mails/sieve/before.sieve sieve_before = file:/data/mails/sieve/before.sieve sieve_global = file:/data/mails/sieve/ }
namespace inbox { inbox = yes
mailbox Trash {
auto = subscribe
special_use = \Trash
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox Spam {
auto = subscribe
special_use = \Junk
}
}
userdb sql { query = SELECT 1 from users where user like '%{user | username}' and domain like '%{user | domain}' and active=1 iterate_query = SELECT user AS username, domain FROM users where active=1 }
passdb sql { query = SELECT concat(user, '@', domain) AS user, password from users where user like '%{user | username}' and domain='%{user | domain}' and active=1 }
service auth { unix_listener auth-userdb { mode = 0600 user = mailusers } }
protocols = imap pop3 sieve lmtp
service imap-login { chroot = login service_count = 0 process_min_avail = 8 }
service indexer-worker { vsz_limit = 8G process_limit = 0 }
protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep imap_max_line_length = 655360 mail_max_userip_connections = 256 # mail_plugins = $mail_plugins imap_zlib }
service pop3-login { chroot = login service_count = 0 }
protocol pop3 { mail_max_userip_connections = 256 pop3_enable_last = yes pop3_lock_session = no pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s pop3_reuse_xuidl = yes }
service lmtp {
inet_listener lmtp {
address = 127.0.0.1
port = 24
}
unix_listener lmtp {
mode = 0666
}
}
service managesieve-login { chroot = login
inet_listener sieve {
port = 4190
}
inet_listener sieveold {
port = 2000
}
service_count = 0
}
protocol sieve { managesieve_implementation_string = dovecot managesieve_logout_format = bytes ( in=%i : out=%o ) mail_max_userip_connections = 256 managesieve_max_line_length = 65536 }
protocol lmtp { mail_plugins = $mail_plugins sieve }
protocol lda { auth_socket_path = /run/dovecot/auth-userdb hostname = mx.grosjo.net mail_plugins = $mail_plugins sieve postmaster_address = admin@grosjo.net lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes }
service stats {
unix_listener stats-writer {
mode = 0660
user = mailusers
}
}
#service decode2text { # executable = script /usr/libexec/dovecot/decode2text.sh # user = dovecot # unix_listener decode2text { # mode = 0666 # } #}
Thank you !
On 2025-02-16 17:02, Joan Moreau via dovecot wrote:
Yes, that is helpful indeed.
Swimming in the pacific ocean here....
Related item : I have "iterate_query" to convert from the old setup to the new config as well. What to do with that ?
Thank you
On 2025-02-16 16:49, Timo Sirainen via dovecot wrote:
On 16. Feb 2025, at 10.37, Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
@Timo : You would just put a page with in 2 columns, left , the old default conf, right, the new default conf, that would be a million times helpful This is done for some settings, but for others there is no exact 1:1 mapping even possible because the configuration is entirely different. Docs could be of course improved a lot, and we're slowly improving improving them, but we've a lot of other work to do as well..
Anyway, Aki did a one-time conversion of the old example-config to v2.4: https://github.com/dovecot/tools/blob/main/dovecot-2.4.0-example-config.tar....
- I guess this could be also linked to in the upgrading docs.
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org