docker-imap-devel icon indicating copy to clipboard operation
docker-imap-devel copied to clipboard

login not possible

Open JanMalte opened this issue 3 years ago • 1 comments

Login using IMAP ist not possible on running a fresh setup with no changes

Attaching to testproject-mailserver-1
testproject-mailserver-1  |  * Starting enhanced syslogd rsyslogd
testproject-mailserver-1  |    ...done.
testproject-mailserver-1  |  * Starting Postfix Mail Transport Agent postfix
testproject-mailserver-1  |    ...done.
testproject-mailserver-1  | Jun 16 09:34:49 f6fb03cbc831 dovecot: ssl-params: Generating SSL parameters
testproject-mailserver-1  | Jun 16 09:34:51 f6fb03cbc831 dovecot: ssl-params: SSL parameters regeneration completed

testproject-mailserver-1  | Jun 16 09:37:32 f6fb03cbc831 dovecot: auth: passwd-file([email protected],172.19.0.1,<YOwUY43hkv+sEwAB>): unknown user (SHA1 of given password: 9d4e1e)

JanMalte avatar Jun 16 '22 09:06 JanMalte

Current workaround is to add the user manually after starting the container

user@host:~# docker compose exec imap bash

root@a8347fca2f85:~# doveadm pw -s sha256-crypt
Enter new password:
Retype new password:
{SHA256-CRYPT}$5$xT21M4rJj6Z5sMUk$iMoVkFkkqnThAzlCpbbO7YQy9aQgW7Q/InZaX79pcs4

root@a8347fca2f85:~# apt update && apt install -y vim

root@a8347fca2f85:~# vim /etc/dovecot/userdb
# add the following line to the end of the file:
# [email protected]:{SHA256-CRYPT}$5$xT21M4rJj6Z5sMUk$iMoVkFkkqnThAzlCpbbO7YQy9aQgW7Q/InZaX79pcs4:1000:1000::/var/mail::

root@a8347fca2f85:~# mkdir /var/mail/example.org

root@a8347fca2f85:~# chown -R docker. /var/mail/example.org

root@a8347fca2f85:~# exit

docker compose restart imap

JanMalte avatar Jul 06 '23 11:07 JanMalte