Okay, here's dovecot.conf in its entirety (with strategic obfuscation, of course).
## Dovecot configuration shipped with debian packages
dovecot_config_version = 2.4.0 dovecot_storage_version = 2.4.0
protocols = imap lmtp sieve lda
!include_try conf.d/*.conf
auth_mechanisms = plain login
sql_driver = mysql
# The mysqld.sock socket may be in different locations in different systems. mysql /var/run/mysqld/mysqld.sock { user = MariaDBuser password = MariaDBpassword dbname = MariaDBdatabase
#ssl = yes #ssl_client_ca_dir = /etc/ssl/certs } # Alternatively you can connect to localhost as well: #mysql localhost { #}
passdb_default_password_scheme = SomethingSecure
passdb sql { query = SELECT user AS username, domain, password FROM mailbox WHERE user = '%{user | username}' AND domain = '%{user | domain}' AND active= '1' } userdb sql { query = SELECT home, uid, gid FROM mailbox WHERE user = '%{user | username}' AND domain = '%{user | domain}' AND active= '1' # For using doveadm -A: iterate_query = SELECT user AS username, domain FROM mailbox }
ssl_server_cert_file = /etc/letsencrypt/live/mailserver.example1.com/fullchain.pem ssl_server_key_file = /etc/letsencrypt/live/mailserver.example1.com/privkey.pem
local 127.0.0.1 { local_name mailserver.example1.com { protocol imap { ssl_server_cert_file = /etc/letsencrypt/live/mailserver.example1.com/fullchain.pem ssl_server_key_file = /etc/letsencrypt/live/mailserver.example1.com/privkey.pem } }
local_name mail.example2.net { protocol imap { ssl_server_cert_file = /etc/letsencrypt/live/mail.example2.net/fullchain.pem ssl_server_key_file = /etc/letsencrypt/live/mail.example2.net/privkey.pem } } }
Timo suggested there might be an unclosed { somewhere before the section with the cert files, but I don't see any. Does anyone see what I've missed?
Ken
On Tue, 2025-02-11 at 10:14 +0200, Timo Sirainen wrote:
On 11. Feb 2025, at 2.09, Ken Wright via dovecot <dovecot@dovecot.org> wrote:
Sorry, I sent that this morning just before running off to my job. Here's the section of dovecot.conf that I'm working on:
Nothing wrong with that part.
When I was running Dovecot 2.3, I was able to send and receive email to and from example1.com and example2.net. I want to be able to do the same with 2.4, but right now when I try to start Dovecot I get an error message like this:
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 42: Unknown section name: local
This most likely means you forgot to close with } an earlier section. v2.4.0 unfortunately gives a rather bad error message in that case. It'll be better in v2.4.1.