[Solved] ISPConfig 3.1b1 and email issues

Discussion in 'Installation/Configuration' started by GeorgeG, Jun 18, 2016.

  1. GeorgeG

    GeorgeG New Member

    Hi All,

    My search did not result to a resolution so... here it is.

    I have followed the perfect server guide Ubuntu 14.04 (Apache2, PHP, MySQL, PureFTPD, BIND, Dovecot, ISPConfig 3) with a couple of minor differences. I used MariaDB instead of MySQL, I have added php7 via a ppa repository, and ended up installing ISPConfig v3.1b1. All that in a linux container (LXC).

    The web side appears to be working fine. WIth PHP5.5.9 as the main PHP version, and PHP7 for the two websites currently setup on the server.

    What I am struggling to sort out is email. So far I have tried/checked the following:
    - All the /var/postfix/*.cf files reference "hosts = 127.0.0.1"
    - hostname -f seems to return the right output "sub.domain.com"
    - I can login via phpMySQL with the password used in the /var/postfix/*.cf (which is the same as the one used by ISPconfig to access the database)
    - I have invoked "php -q update.php" in an attempt to reconfigure the services, without any success, email still not functional.

    I am running out of time and still do not really known of what to look for next. Can anyone shed some light on this?

    Output of: # more htf_report.txt
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    IP-address(es) (as per ifconfig): ***.***.***.***
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.1b1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 5.5.9-1ubuntu4.17
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 5407)
    [INFO] I found the following mail server(s):
            Postfix (PID 29989)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 31641)
    [INFO] I found the following imap server(s):
            Dovecot (PID 31641)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 31713)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [anywhere]:993          (31641/dovecot)
    [anywhere]:995          (31641/dovecot)
    [localhost]:10023               (2715/postgrey.pid)
    [localhost]:10024               (8081/amavisd-new)
    [localhost]:10025               (29989/master)
    [localhost]:10026               (8081/amavisd-new)
    [anywhere]:3306         (29699/mysqld)
    [localhost]:10027               (29989/master)
    [anywhere]:587          (29989/master)
    [localhost]:6379                (17549/redis-server)
    [localhost]:11211               (1890/memcached)
    [anywhere]:110          (31641/dovecot)
    [anywhere]:143          (31641/dovecot)
    [anywhere]:465          (29989/master)
    [localhost]:9010                (13593/php-fpm.conf))
    ***.***.***.***:53              (31741/named)
    [localhost]:53          (31741/named)
    [anywhere]:21           (31713/pure-ftpd)
    [anywhere]:22           (484/sshd)
    [localhost]:953         (31741/named)
    [anywhere]:25           (29989/master)
    *:*:*:*::*:993          (31641/dovecot)
    *:*:*:*::*:995          (31641/dovecot)
    *:*:*:*::*:587          (29989/master)
    [localhost]10           (31641/dovecot)
    [localhost]43           (31641/dovecot)
    *:*:*:*::*:80           (5407/apache2)
    *:*:*:*::*:8081         (5407/apache2)
    *:*:*:*::*:465          (29989/master)
    *:*:*:*::*:53           (31741/named)
    *:*:*:*::*:21           (31713/pure-ftpd)
    *:*:*:*::*:22           (484/sshd)
    *:*:*:*::*:8888         (5407/apache2)
    *:*:*:*::*:953          (31741/named)
    *:*:*:*::*:25           (29989/master)
    *:*:*:*::*:443          (5407/apache2)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    fail2ban-postfix-sasl  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 25
    fail2ban-dovecot-pop3imap  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 110,995,143,993
    fail2ban-pureftpd  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 21
    fail2ban-ssh  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain fail2ban-dovecot-pop3imap (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain fail2ban-postfix-sasl (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain fail2ban-pureftpd (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain fail2ban-postfix-sasl (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain fail2ban-pureftpd (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain fail2ban-ssh (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    /var/log/mail.log
    Code:
    Jun 14 20:22:01 sub postfix/qmgr[2020]: 4107763A9B: from=<[email protected]>, size=1987, nrcpt=1 (queue active)
    Jun 14 20:22:01 sub amavis[24549]: (24549-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)
    Jun 14 20:22:01 sub amavis[24549]: (24549-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 136) line 247.
    Jun 14 20:22:01 sub amavis[24549]: (24549-01) (!)Requesting process rundown after fatal error
    Jun 14 20:22:01 sub postfix/smtp[28141]: 4107763A9B: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=554763, delays=554763/0.01/0/0.01, dsn=4.3.2, status=deferred (host 127.0.0.1[127.0.0.1] said: 42
    1 4.3.2 Service shutting down, closing channel (in reply to RCPT TO command))
    Jun 14 20:22:01 sub postfix/smtp[28141]: warning: connect to mysql server 127.0.0.1: Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)
    Jun 14 20:22:01 sub postfix/smtp[28141]: warning: mysql:/etc/postfix/mysql-virtual_relaydomains.cf: table lookup problem
    Jun 14 20:22:01 sub postfix/smtp[28141]: warning: 4107763A9B: flush service failure
    Jun 14 20:22:01 sub postfix/qmgr[2020]: 4107763A9B: from=<[email protected]>, status=expired, returned to sender
    Jun 14 20:22:01 sub postfix/proxymap[28146]: warning: connect to mysql server 127.0.0.1: Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)
    Jun 14 20:22:01 sub postfix/trivial-rewrite[28147]: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "*"
    Jun 14 20:22:01 sub postfix/cleanup[28145]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "[email protected]"
    Jun 14 20:22:01 sub postfix/cleanup[28145]: warning: 867B163AC9: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
    Jun 14 20:22:01 sub postfix/qmgr[2020]: 4107763A9B: status=deferred (bounce failed)
    
    Regards,
    GeorgeG
     
    Last edited: Jun 18, 2016
  2. sjau

    sjau Local Meanie Moderator

    Code:
    Jun 14 20:22:01 sub postfix/proxymap[28146]: warning: connect to mysql server 127.0.0.1: Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)
    
    Have a look at the mysql-virtual_xxx files. For me they look like:
    Code:
    user = ispconfig  
    password = ***  
    dbname = dbispconfig  
    table = mail_user  
    select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')  
    where_field = login  
    additional_conditions = and postfix = 'y' and server_id = 1  
    hosts = 127.0.0.1 
    
    You sure you can login with those credentials?
     
  3. GeorgeG

    GeorgeG New Member

    Hi sjau,

    All the mysql-virtual_XXX.cf files contain the same credentials, and they look very similar to the one you kindly included in you post. The fields user, password and hosts are identical for all the files.

    I did test these from phpmyadmin as well as via the command line mysql client. And they work perfectly fine. And by that I mean I can use dbispconfig and select from tables without any warnings/issues.

    Regards,
    GeorgeG
     
  4. sjau

    sjau Local Meanie Moderator

    maybe you're missing the postfix-mysql package?
     
  5. GeorgeG

    GeorgeG New Member

    Hi sjau,

    I am afraid not... I did question my sanity though and invoked "apt-get install postfix-mysql" and all I got was "postfix-mysql is already the newest version"....

    Any other ideas?

    Regards,
    GeorgeG
     
  6. sjau

    sjau Local Meanie Moderator

    you must have gnomes in your computer/server

    pastebin "postconf" output?
     
  7. GeorgeG

    GeorgeG New Member

  8. florian030

    florian030 Well-Known Member HowtoForge Supporter

    This is a permission-problem for the user defined in the mysql_* files.

    mysql -u ispconfig -pPASSWORD_FROM_FILE -h localhost

    iif you can login into mysql:
    use dbispconfig;
    select * from mail_user;
     
  9. GeorgeG

    GeorgeG New Member

    Hi florian030,

    I have tried that. The user can logon and execute queries fine. Both from the mysql cli client and phpmyadmin.


    Regards,
    GeorgeG
     
  10. GeorgeG

    GeorgeG New Member

    Hello All,

    Weirdest thing ever! (I suppose more experience linux users might have experienced this...)
    While messing about with the tuning on a website on the server (site is running for a week now, so it was time to get some stats), I run the script from http://mysqltuner.com/
    At the top I noticed a warning about user '[email protected]' has no password set.
    My first thought was... "what the...?!?"
    "Solution" was to login to mysql as root, set the password for the user (using the long ispconfig password registered in many places on the system).
    Now things seem to be in working order...

    Thanks for everyone's contribution to this.

    Regards,
    GeorgeG
     

Share This Page