Problem with mysql for postfix

Discussion in 'Installation/Configuration' started by Abdelkarim Mateos, Jul 11, 2016.

  1. Abdelkarim Mateos

    Abdelkarim Mateos New Member

    I get errors on my postfix installation on ISPConfig
    On others VPS, correct upgrading ISP to 3.1 stable (Centos 7.2) and force reconfigure services.

    But now not work.

    Code:
    Jul 11 15:10:19 kvm471 postfix/smtp[12788]: warning: connect to mysql server 127.0.0.1: Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)
    Jul 11 15:10:19 kvm471 postfix/smtp[12788]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Jul 11 15:10:19 kvm471 postfix/smtp[12788]: warning: 753292074880: flush service failure
    Jul 11 15:10:19 kvm471 postfix/smtp[12790]: 791142074881: to=<[email protected]>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, delay=329, delays=329/0.03/0.01/0.03, dsn=4.3.2, status=deferred (host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel (in reply to RCPT TO command))
    Jul 11 15:10:19 kvm471 postfix/smtp[12790]: warning: connect to mysql server 127.0.0.1: Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)
    Jul 11 15:10:19 kvm471 postfix/smtp[12790]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Jul 11 15:10:19 kvm471 postfix/smtp[12790]: warning: 791142074881: flush service failure
    Jul 11 15:10:19 kvm471 postfix/qmgr[12787]: E395B26CEEE4: from=<[email protected]>, size=653, nrcpt=1 (queue active)
    Jul 11 15:10:19 kvm471 amavis[12797]: (12797-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306': Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)

    Well, try search all files on postfix with password. (note password not real, but all password are same)

    Code:
    grep 'password' /etc/postfix/*
    /etc/postfix/main.cf:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/main.cf:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/main.cf:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/main.cf~2:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/main.cf~2:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/main.cf~2:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/main.cf~3:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/main.cf~3:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/main.cf~3:# NOTE: if you use this feature for accounts not in the UNIX password
    /etc/postfix/mysql-virtual_client.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_domains.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_email2email.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_forwardings.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_mailboxes.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_outgoing_bcc.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_policy_greylist.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_recipient.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_relaydomains.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_relayrecipientmaps.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_sender.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_sender_login_maps.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df
    /etc/postfix/mysql-virtual_transports.cf:password = 2ac36hsgBqsgIq8765shwb0e171672df

    Well if try on locahost connect:
    Code:
    mysql -u ispconfig -p2ac3621ed334efc7669fbb0e171672df
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 1104
    Server version: 10.1.14-MariaDB MariaDB Server
    
    Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]>
    I don't understand why it's the problem.

    Of course, And in anticipation of the typical reply "You must update your ISPConfig" I must say:

    1. Download latest stable ISPConfig3-stable
    2. Unpack and php -q update.php
    3. REINSTALL ALL SERVICIES except apache.
     
    Last edited: Jul 11, 2016
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess your mysql test command might be wrong, as it does not test a mysql connection trough the IP 127.0.0.1. Try this:

    mysql -h 127.0.0.1 -u ispconfig -p2ac3621ed334efc7669fbb0e171672df

    The issues is that mysql does not accpets connections over the localhost network, so it's not a issue in the ispconfig configuration and thats why a reconfigure did not help. Check the mysql config and ensure that you can connect with localhost and 127.0.0.1 to mysql.
     

Share This Page