Mailcow-dockerized: hard coded dba password

Created on 8 Feb 2019  路  2Comments  路  Source: mailcow/mailcow-dockerized

After an update this morning my dovecot container stuffed my logfile with these errors:

dovecot-mailcow_1    | 1045 (28000): Access denied for user 'mailcow'@'localhost' (using password: YES) - trying again...
dovecot-mailcow_1    | 1045 (28000): Access denied for user 'mailcow'@'localhost' (using password: YES) - trying again...
dovecot-mailcow_1    | 1045 (28000): Access denied for user 'mailcow'@'localhost' (using password: YES) - trying again...
dovecot-mailcow_1    | 1045 (28000): Access denied for user 'mailcow'@'localhost' (using password: YES) - trying again...
dovecot-mailcow_1    | 1045 (28000): Access denied for user 'mailcow'@'localhost' (using password: YES) - trying again...

I found the hard-coded password here: https://github.com/mailcow/mailcow-dockerized/blob/master/data/Dockerfiles/dovecot/quarantine_notify.py#L33

After changing the password everything is in order again.

Most helpful comment

Meh. I鈥檓 sorry.

All 2 comments

I'm seeing the same behavior. I think these variables should be read from the ENV variables.

--- quarantine_notify.py    2019-02-08 09:51:55.985433633 +0100
+++ /usr/local/bin/quarantine_notify.py 2019-02-08 09:54:42.228776755 +0100
@@ -30,7 +30,7 @@
 def query_mysql(query, headers = True, update = False):
   while True:
     try:
-      cnx = mysql.connector.connect(unix_socket = '/var/run/mysqld/mysqld.sock', user='mailcow', passwd='9S6jd31ijEytZE9lQ8sWOxK34tg5', database='mailcow', charset="utf8")
+      cnx = mysql.connector.connect(unix_socket = '/var/run/mysqld/mysqld.sock', user=os.environ['DBUSER'], passwd=os.environ['DBPASS'], database='mailcow', charset="utf8")
     except Exception as ex:
       print '%s - trying again...'  % (ex)
       time.sleep(3)

Meh. I鈥檓 sorry.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

a3li picture a3li  路  3Comments

pgollor picture pgollor  路  3Comments

CrAazZyMaN21 picture CrAazZyMaN21  路  3Comments

damdinsharav picture damdinsharav  路  3Comments

Adorfer picture Adorfer  路  3Comments