technicalguru / docker-mailserver-roundcube

Docker image for RoundCube in mailserver projects
Other
5 stars 1 forks source link

Roundcube user trying to connect to the container itself rather than the DB #5

Closed Oartihsin closed 2 years ago

Oartihsin commented 2 years ago

Command used

docker run -e RC_DB_HOST=172.17.0.5 -e RC_DB_USER=rc -e RC_DB_PASS=rcpostfix -e RC_DB_NAME=roundcube -e RC_DES_KEY=howdidigetthiskeysaccess -e RC_IMAP_SERVER_NAME=mail.example.com -e RC_SMTP_SERVER_NAME=mail.example.com -e RC_DEFAULT_DOMAIN -p 4201:80 mail:roundcube

User created and granted access (Executed on Database container) GRANT ALL ON roundcube.* TO 'rc'@'localhost' IDENTIFIED BY 'rcpostfix';

Error

DSN (write): NOT OK(SQLSTATE[HY000] [1045] Access denied for user 'rc'@'172.17.0.11' (using password: YES)) Make sure that the configured database exists and that the user has write privileges DSN: mysql://rc:rcpostfix@172.17.0.5/roundcube

172.17.0.11 is the roundcube container IP 172.17.0.5 is the database container IP

Why is it connecting to 172.17.0.11??

technicalguru commented 2 years ago

Hello,

the message comes from your DB server and says that the user rc tries to connect from 172.17.0.11 but gets rejected. Please make sure that your database accepts this user from this host (u allowed from localhost only).

The correct GRANT would be:

GRANT ALL ON roundcube.* TO 'rc'@'172.17.0.11' IDENTIFIED BY 'rcpostfix';
Oartihsin commented 2 years ago

Ok i get it. I added the command and now it works

Can you help me with which username password does this testing talk about image

technicalguru commented 2 years ago

That is the username (email) and password combination of your mail account at that postfix server (I assume. Haven't seen that screen before)

Oartihsin commented 2 years ago

Hey I am getting confused by this. Can we get in a call, whenever you are free?

technicalguru commented 2 years ago

Please contact me on Twitter (@technicalg) and send dm there.

Oartihsin commented 2 years ago

Got to run it after a few dreadful attemps. Thanks ralph for your continuous assistance. Good to close issue