On 23/08/25, Dharma Mati via dovecot ([email protected]) 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-settings

# 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_use
    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-server-name-indication-support
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
# }

_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to