2.4 config nightmares
I have been trying for weeks to make it work.But I simply cant. Would you plz kindly tell me how it should be? :
doveconf -n
2.3.21.1 (d492236fa0): /etc/dovecot/dovecot.conf
OS: Linux 6.1.67-gentoo x86_64 Gentoo Base System release 2.17 ext4
Hostname: ..................
auth_mechanisms = cram-md5 plain login disable_plaintext_auth = no listen = * mail_location = maildir:/home/vmail/%d/%n/Maildir namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = * driver = pam } passdb { args = scheme=CRAM-MD5 username_format=%u /etc/dovecot/users driver = passwd-file } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } ssl_cert = </etc/ssl/private/server.crt ssl_key = # hidden, use -P to show it userdb { driver = passwd } userdb { args = scheme=CRAM-MD5 username_format=%u /etc/dovecot/users driver = passwd-file } userdb { args = uid=vmail gid=vmail home=/home/vmail/%d/%n driver = static } local_name asl.dynu.net { ssl_cert = </etc/letsencrypt/live/asl.dynu.net/fullchain.pem ssl_key = # hidden, use -P to show it } local_name { ssl_cert = </etc/letsencrypt/live//fullchain.pem ssl_key = # hidden, use -P to show it } etc. Plz help me.And kindly consider creating a migration tool.Thanks a lot Andreas
I have been trying for weeks to make it work.But I simply cant. Would you plz kindly tell me how it should be? : doveconf -n
2.3.21.1 (d492236fa0): /etc/dovecot/dovecot.conf
OS: Linux 6.1.67-gentoo x86_64 Gentoo Base System release 2.17 ext4
Hostname: ..................
auth_mechanisms = cram-md5 plain login disable_plaintext_auth = no listen = * mail_location = maildir:/home/vmail/%d/%n/Maildir namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = * driver = pam } passdb { args = scheme=CRAM-MD5 username_format=%u /etc/dovecot/users driver = passwd-file } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } ssl_cert = </etc/ssl/private/server.crt ssl_key = # hidden, use -P to show it userdb { driver = passwd } userdb { args = scheme=CRAM-MD5 username_format=%u /etc/dovecot/users driver = passwd-file } userdb { args = uid=vmail gid=vmail home=/home/vmail/%d/%n driver = static } local_name [1]asl.dynu.net { ssl_cert = </etc/letsencrypt/live/[2]asl.dynu.net/fullchain.pem ssl_key = # hidden, use -P to show it } local_name { ssl_cert = </etc/letsencrypt/live//fullchain.pem ssl_key = # hidden, use -P to show it } etc. Plz help me.And kindly consider creating a migration tool.Thanks a lot Andreas
References
Visible links
On 23/08/2025 20:38 EEST Dharma Mati via dovecot <dovecot@dovecot.org> wrote:
I have been trying for weeks to make it work.But I simply cant. Would you plz kindly tell me how it should be? :
doveconf -n
Hi!
Did you notice the example config at https://github.com/dovecot/tools/blob/main/dovecot-2.4.0-example-config.tar.... ? This has usually proven to be useful for migration.
Aki
On 2025-08-23 10:51, Aki Tuomi via dovecot wrote:
On 23/08/2025 20:38 EEST Dharma Mati via dovecot <dovecot@dovecot.org> wrote:
I have been trying for weeks to make it work.But I simply cant. Would you plz kindly tell me how it should be? :
doveconf -n Hi!
Did you notice the example config at https://github.com/dovecot/tools/blob/main/dovecot-2.4.0-example-config.tar.... ? This has usually proven to be useful for migration.
Not merely useful: essential. There is also a how-to on the dovecot site (specifically covering the transition from 2.3 to 2.4), which may be easier to use because it points you to the necessary changes.
Cheers
Cam
Aki Tuomi via dovecot said on Sat, 23 Aug 2025 20:51:00 +0300 (EEST)
https://github.com/dovecot/tools/blob/main/dovecot-2.4.0-example-config.tar....
After downloading with wget, this happened:
[slitt@mydesk junk]$ unzip ../dovecot-2.4.0-example-config.tar.gz Archive: ../dovecot-2.4.0-example-config.tar.gz End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of ../dovecot-2.4.0-example-config.tar.gz or ../dovecot-2.4.0-example-config.tar.gz.zip, and cannot find ../dovecot-2.4.0-example-config.tar.gz.ZIP, period. [slitt@mydesk junk]$
I also tried gunzip, failed. I tried the normal Ctrl+x in the following happened:
[slitt@mydesk junk]$ unzip ../dovecot-2.4.0-example-config.tar.gz Archive: ../dovecot-2.4.0-example-config.tar.gz End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of ../dovecot-2.4.0-example-config.tar.gz or ../dovecot-2.4.0-example-config.tar.gz.zip, and cannot find ../dovecot-2.4.0-example-config.tar.gz.ZIP, period. [slitt@mydesk junk]$
file-roller also failed. gvim showed a file with some sort of error message. It shouldn't be this difficult.
SteveT
Steve Litt
Hello, File dovecot-2.4.0-example-config.tar.gz is a tar gzipped file. tar can usually handle this by itself. Try doing tar zxvf ../dovecot-2.4.0-example-config.tar.gz
It should work.
Regards, Antonio
On 24/08/2025 04:17 EEST Steve Litt via dovecot <[1]dovecot@dovecot.org>
wrote:
Aki Tuomi via dovecot said on Sat, 23 Aug 2025 20:51:00 +0300 (EEST)
>[2]https://github.com/dovecot/tools/blob/main/dovecot-2.4.0-example-config.tar.gz
After downloading with wget, this happened:
[slitt@mydesk junk]$ unzip ../dovecot-2.4.0-example-config.tar.gz
Archive: ../dovecot-2.4.0-example-config.tar.gz
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of
../dovecot-2.4.0-example-config.tar.gz or
../dovecot-2.4.0-example-config.tar.gz.zip, and cannot find
../dovecot-2.4.0-example-config.tar.gz.ZIP, period. [slitt@mydesk junk]$
I also tried gunzip, failed. I tried the normal Ctrl+x in the following
happened:
[slitt@mydesk junk]$ unzip ../dovecot-2.4.0-example-config.tar.gz
Archive: ../dovecot-2.4.0-example-config.tar.gz
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of
../dovecot-2.4.0-example-config.tar.gz or
../dovecot-2.4.0-example-config.tar.gz.zip, and cannot find
../dovecot-2.4.0-example-config.tar.gz.ZIP, period. [slitt@mydesk junk]$
file-roller also failed. gvim showed a file with some sort of error
message. It shouldn't be this difficult.
SteveT
Steve Litt
[3]http://444domains.com
Did you try opening the link using a browser? I pasted the link to github page but here is direct link too:
[4]https://github.com/dovecot/tools/raw/refs/heads/main/dovecot-2.4.0-example-c...
Aki
References
Visible links
Steve Litt via dovecot skrev den 2025-08-24 03:17:
Aki Tuomi via dovecot said on Sat, 23 Aug 2025 20:51:00 +0300 (EEST)
https://github.com/dovecot/tools/blob/main/dovecot-2.4.0-example-config.tar....
After downloading with wget, this happened:
[slitt@mydesk junk]$ unzip ../dovecot-2.4.0-example-config.tar.gz Archive: ../dovecot-2.4.0-example-config.tar.gz End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of ../dovecot-2.4.0-example-config.tar.gz or ../dovecot-2.4.0-example-config.tar.gz.zip, and cannot find ../dovecot-2.4.0-example-config.tar.gz.ZIP, period. [slitt@mydesk junk]$
its not a zip file :)
$ tar -xvzf <archive>
On August 24, 2025 11:43:11 AM GMT+03:00, Benny Pedersen via dovecot <dovecot@dovecot.org> wrote:
Steve Litt via dovecot skrev den 2025-08-24 03:17:
Aki Tuomi via dovecot said on Sat, 23 Aug 2025 20:51:00 +0300 (EEST)
https://github.com/dovecot/tools/blob/main/dovecot-2.4.0-example-config.tar....
After downloading with wget, this happened:
[slitt@mydesk junk]$ unzip ../dovecot-2.4.0-example-config.tar.gz Archive: ../dovecot-2.4.0-example-config.tar.gz End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of ../dovecot-2.4.0-example-config.tar.gz or ../dovecot-2.4.0-example-config.tar.gz.zip, and cannot find ../dovecot-2.4.0-example-config.tar.gz.ZIP, period. [slitt@mydesk junk]$
its not a zip file :)
$ tar -xvzf <archive>
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
well it's not tgz either, it's a html, if you got that down. real file is at https://github.com/dovecot/tools/raw/refs/heads/main/dovecot-2.4.0-example-c... as told
one can use "file" utility to verify type. or "strings" or "less" (escapes with "q") to look into offending file, on what it is
tar also has "-t" option instead of "-x", that's to list contents before extracting. tar can also overwrite items in current directory, so it's best if you do it in new directory and / or check what file actually contains
unzip has same options
they all also give you options to extract into specified directory too
On 24/08/25, Benny Pedersen via dovecot (dovecot@dovecot.org) wrote:
Steve Litt via dovecot skrev den 2025-08-24 03:17:
Aki Tuomi via dovecot said on Sat, 23 Aug 2025 20:51:00 +0300 (EEST)
unzip: cannot find zipfile directory in one of ../dovecot-2.4.0-example-config.tar.gz or ../dovecot-2.4.0-example-config.tar.gz.zip, and cannot find ../dovecot-2.4.0-example-config.tar.gz.ZIP, period. [slitt@mydesk junk]$
its not a zip file :)
$ tar -xvzf <archive>
There is also a dovecot.conf in the docker image, which you can either read out or swap out for testing.
for example, to read out:
docker run -p 1143:143 -p 1993:993 dovecot/dovecot:latest
CONT_NAME=$(docker container ls --filter="ancestor=dovecot/dovecot:latest" --format='{{.Names}}')
docker cp ${CONT_NAME}:/etc/dovecot/dovecot.conf /tmp/d.conf
or to swap out:
(assuming you have 'dovecot.conf' and other support files in a local directory)
docker run -p 1143:143 -p 1993:993 \
-v ./:/etc/dovecot \
dovecot/dovecot:latest
I found the latter very helpful for syntax checking.
By the way the dovecot binaries are at '/dovecot/bin' in the Docker image, so you can use those with a running Docker instance if needed. eg
docker exec ${CONT_NAME} /dovecot/bin/doveadm config imap
Cheers
On 23/08/25, Dharma Mati via dovecot (dovecot@dovecot.org) wrote:
I have been trying for weeks to make it work.But I simply cant. Would you plz kindly tell me how it should be? :
Below is a version of your configuration file that seems to allow Dovecot 2.4 to start, at least.
To make it run with the official Dovecot docker image, I've had to make some changes to paths -- more work is required.
I suggest you grab the configuration setup here: https://github.com/rorycl/dovecot-config/tree/main/migration and add your userdb and passdb files and see if a test Docker run works with that. You can test logins with nc
as shown at that "migration" url.
I suggest you read through the upgrade notes at the url below.
Cheers, Rory
for translation of settings, see
https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html#converted...
https://doc.dovecot.org/2.4.1/core/config/quick.html
dovecot_config_version = 2.4.1 dovecot_storage_version = 2.4.0
enable desired protocols:
protocols { imap = yes lmtp = yes }
ok
auth_mechanisms = cram-md5 plain login
disable_plaintext_auth = no
auth_allow_cleartext = yes
ok; can expand for ipv6
listen = *
listen = *, ::
mail_* confi has changed
mail_location = maildir:/home/vmail/%d/%n/Maildir
examples from example configuration in docker image
mail_driver=maildir mailbox_list_layout=index mailbox_list_utf8=yes mail_path=~/mail
mail_home=/srv/vmail/%{user | lower}
variable naming has changed; here is a go at translating
mail_home=/home/vmail/%{user|domain}/%{user|username}/Maildir mail_utf8_extensions = yes
default login user for Docker ONLY
DO NOT USE IN PRODUCTION
default_internal_user = vmail default_login_user = vmail default_internal_group = vmail
logging for Docker: don't use in production
log_path = /dev/stderr info_log_path = /dev/stderr debug_log_path = /dev/stderr
namespace inbox { inbox = yes
location = ??
mailbox Drafts { # check https://doc.dovecot.org/2.4.1/core/config/namespaces.html#mailbox_special_us... special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash }
prefix = ??
}
passdb {
args = *
driver = pam
}
Example: authenticate system users:
passdb pam { }
passdb {
args = scheme=CRAM-MD5 username_format=%u /etc/dovecot/users
driver = passwd-file
}
example passdb if pam is not used
passdb user-only { driver = passwd-file auth_username_format=%{user|username|lower} passwd_file_path = /etc/dovecot/users.db }
haven't looked at this
service auth {
unix_listener /var/spool/postfix/private/auth {
unix_listener /etc/dovecot/socket/example-postfix.sock { # group = postfix group = vmail mode = 0666 # user = postfix user = vmail } }
ssl_cert = </etc/ssl/private/server.crt
ssl_key = # hidden, use -P to show it
example ssl config
ssl = yes ssl_server { cert_file = /etc/dovecot/certs/server.crt key_file = /etc/dovecot/certs/server.key }
userdb {
driver = passwd
}
userdb {
args = scheme=CRAM-MD5 username_format=%u /etc/dovecot/users
driver = passwd-file
}
userdb {
args = uid=vmail gid=vmail home=/home/vmail/%d/%n
driver = static
}
example userdb
userdb user-only { driver = passwd-file auth_username_format=%{user|username|lower} passwd_file_path = /etc/dovecot/users.db }
https://doc.dovecot.org/2.4.1/core/config/ssl.html#with-client-tls-sni-serve...
local_name example.net { ssl_server_cert_file = /etc/dovecot/certs/example.crt ssl_server_key_file = /etc/dovecot/certs/example.key }
local_name {
ssl_cert = </etc/letsencrypt/live/fullchain.pem
ssl_key = # hidden, use -P to show it
}
participants (8)
-
aholiveiraï¼ gmail.com
-
Aki Tuomi
-
Benny Pedersen
-
Cam Ellison
-
Dharma Mati
-
Rory Campbell-Lange
-
Steve Litt
-
Sulev-Madis Silber