lejmr / iredmail-docker

iRedmail docker container
https://hub.docker.com/repository/docker/lejmr/iredmail
133 stars 59 forks source link

Cannot login into the system after installation #78

Closed nhienkrajak closed 3 years ago

nhienkrajak commented 4 years ago

I have installed the container on Ubuntu 18.04. Here is my settings:

docker run -p 8780:80 -p 47443:443 \
           -e "DOMAIN=mydomain.com" -e "HOSTNAME=mail" \
           -e "MYSQL_ROOT_PASSWORD=password" \
           -e "SOGO_WORKERS=1" \
           -e "TZ=Asia/Ho_Chi_Minh" \
           -e "POSTMASTER_PASSWORD={PLAIN}Postmasterpassword" \
           -e "IREDAPD_PLUGINS=['reject_null_sender', 'reject_sender_login_mismatch', 'greylisting', 'throttle', 'amavisd_wblist', 'sql_alias_access_policy']" \
           -v /srv/iredmail/mysql:/var/lib/mysql \
           -v /srv/iredmail/vmail:/var/vmail \
           -v /srv/iredmail/clamav:/var/lib/clamav \
           --name=iredmail lejmr/iredmail:mysql-latest

I have an MX record and A record for mail.mydomain.com.

The deployment is working fine, and I am able to access iRedMail login screen through http://myip:8780/iredadmin

However, I can not login using account "postmaster@mydomain.com / Postmasterpassword". It keeps saying "Incorrect account or password." I tried to insert (to vmail) a new account into the same domain, using iRedMail script. But it still does not work.

What am I missing? Anything I can do to figure out the way to move on?

GianluigiMemoli commented 4 years ago

I noticed that even if you set the domain and hostname when running docker run cmd nothing changes, so if you read the iredmail.tips file you'll see the credentials will be "postmaster@DOMAIN" and the password "password"

thapecroth commented 4 years ago

@GianluigiMemoli Hi I tried that username, and password it's not working on my setup.

lejmr commented 4 years ago

Look at the README please. Hostname is set through -h not env variables which is the old approach/deprecated..

nhienkrajak commented 4 years ago

Thanks a lot for your support. I actually used -h option to set domain and hostname, before changing to env variables.

My issue is probably caused by the situation that the iredmail docker is staying behind an nginx reverse proxy, which is also running in a docker (jwilder/nginx-proxy). If I remove the reverse proxy, then everything is OK. I can login into iredamin web application as postmaster.

Now I'm looking to this thread too see how I can add the reverse proxy back.