Postfix mysql error

Discussion in 'Installation/Configuration' started by downsouth, May 3, 2018.

  1. downsouth

    downsouth New Member HowtoForge Supporter

    Hi
    I followed the 'The Perfect Server - Debian 9 (Stretch) with Apache, BIND, Dovecot, PureFTPD and ISPConfig 3.1' tutorial.
    I am currently trying to get email working and while looking at logs I found this:
    Code:
    postfix/proxymap[1629]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")
    During the installation I came across 2 things that did not work as stated in the tutorial...

    Code:
    Web server to reconfigure automatically: <- apache2
    Configure database for phpmyadmin with dbconfig-common? <- yes
    Enter the phpmyadmin application password? <-  Just press enter
    Enter the password of the administrative user? <- yourrootmysqlpassword
    Code:
    Configure database for roundcube with dbconfig.common? <-- yes
    MySQL application password for roundcube: <-- press enter
    Password of the databases administrative user: <-- enter the MySQL root password here.
    For both of these sections the system did NOT ask for the MySQL root password as stated in the tutorial.
    I am not sure if this has anything to do with the issue found in the logs.

    The problem that I am having is that the email client says that the smtp server timed out.
     
  2. Ghostdare

    Ghostdare Member

    First, make sure that MySQL service is running
    Code:
    netstat -tap | grep mysql
    Then make sure that you commented out the line bind-address = 127.0.0.1 from MySQL conf file.
     
  3. downsouth

    downsouth New Member HowtoForge Supporter

    Hi
    The conf file was correct.
    The check for the mysql running gave me this:
    tcp6 0 0 [::]:mysql [::]:* LISTEN 1208/mysqld
     
  4. Ghostdare

    Ghostdare Member

    Did you stop service apparmor and disable it?

    anyway "Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")" message I think that is because MySQL server is binded on particular ip

    recheck /etc/mysql/my.cnf for "bind-address =" and make sure that is an # in front of it

    The example above is with MySQL, MariaDB is in /etc/mysql/mariadb.conf.d/50-server.cnf
     
    Last edited: May 4, 2018
  5. downsouth

    downsouth New Member HowtoForge Supporter

    What do you mean by this?
    This is how the setting is in the file:
    Code:
    #bind-address        = 127.0.0.1
    sql-mode="NO_ENGINE_SUBSTITUTION"
    Even though I chose to install mysql I did notice during the install that mariadb was installed instead. Not sure why.

    I have just taken another look in email warning logs and there are no such errors for today.
    I am currently investigating why the smtp server is not working. I am new to ispconfig so it is most likely that I have not set the email client correctly.
    Unfortunatly there seems to be no information in the manual about how the email clients should be set.
    I did see a post in the forum claiming that Thunderbird will find all the settings, but that is not the case when you are changing existing clients to a new mail server. Even simple things like is it mail.myserver.com or smtp.myserver.com could help save alot of time.
     
    Last edited: May 4, 2018
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Using mriadb is fine.

    There is nothing special in this regard, just enter the email address and password and server hostname in your mail client.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    To test your email system, do this:

    Login to the webmail client (roundcube) that you installed on the server with an email address and password that you created in ISPConfig. Then send an email to the same address that you used for the webmail login. The email should arrive within a few seconds in the mailbox. If not, then check the mail.log for errors.
     
  8. downsouth

    downsouth New Member HowtoForge Supporter

    Okay for my understanding...
    if my server = this.myserver.com and the client url is client1.here.com then I must get the client to set their email smtp to point to this.myserver.com?
    I have just tried that and I still get an error that smtp server has timed out.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You can use any domain, subdomain or IP address which points to that server, it simply does not matter, all of them are working. But not all of them are in the SSL cert that the mail system uses, so it is better to use the server hostname.

    I explained above how to test your mail system.
     
  10. downsouth

    downsouth New Member HowtoForge Supporter

    I did the test that you suggested and it works. So I assume that means that my configuration in Thunderbird is wrong.
    My settings are:
    Server Name: this.myserver.com
    Port: 465
    Connection Security: SSL/TLS
    Authentication Method: Normal Password
    User Name:[email protected]
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The default SMTPS port used today is 587 and that's the one you should use to connect to your ISPConfig server.
     
  12. downsouth

    downsouth New Member HowtoForge Supporter

    Hi
    Ok that has fixed it. :)
    Thank you very much for your assistance
     

Share This Page