ispconfig 3 multiserver

Discussion in 'Installation/Configuration' started by chief, Jul 18, 2018.

  1. chief

    chief Member

    so, i can ping the ip and the server names.
    as stated, i have isp static ip's and they work, i can connect to either the ip or the hostname and ping the ip and hostname.
    how do i check the nameserver system is working, when i add a website via control panel, so the ns1 and ns2 are doing their thing correctly.
    i will read your post.
    re manual. i have constructed up to adding the mail server, need to compile the db, ns1 and ns2 then its ready for proof reading.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Test with
    Code:
    host yourdomain.tld 133.133.133.133
    where 133.133.133.133 is ip number of your name server.
     
  3. chief

    chief Member

    funnily enough, the site is now available. must have been at the correct moment for dns to update.
    another question, this time regarding the correct IP setup. I have 16 static IP's 79.79.62.0 - 79.79.62.15
    i have setup the servers as follows, IP address changes to suite. /etc/network/interfaces

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    source /etc/network/interfaces.d/*
    # The loopback network interface
    auto lo
    iface lo inet loopback
    # The primary network interface
    allow-hotplug enp0s7
    iface enp0s7 inet static
    address 79.79.62.8
    netmask 255.255.255.240
    network 79.79.62.0/28
    broadcast 79.79.62.15
    gateway 79.79.62.1
    dns-search 78.151.236.1 78.151.235.130
    # dns-search tlsystems.co.uk

    Do i need to specify dns-search?
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Good thing you got name service working.
    Whether you need dns-search or not does not depend on the information you provided.
    dns-search determines which domain is appended for dns lookups. Look it up in manual or Internet to see what it does.
     
  5. chief

    chief Member

    1 things that im struggling with and its not discussed in the documentation is getting roundcube talking to the mailserver.
    i add email via web the control panel, so dave@domain is added. i set password. login vai domain.com/webmail so i get roundcube login and it failes everytime.
     
  6. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    try adding
    Code:
    $config['debug_level'] = 4;
    $config['sql_debug'] = true;
    $config['imap_debug'] = true;
    
    to /etc/roundcube/config.inc.php
    if you see no output, check your /var/log/mail.log

    you could also try/check for
    Code:
    $config['smtp_port'] = 587;
    $config['smtp_user'] = '%u';
    $config['smtp_pass'] = '%p';
    $config['smtp_server'] = 'tls://<fqdn>';
    $config['default_host'] = 'tls://<fqdn>';
    
     
  7. chief

    chief Member

    ok, editing now.. thank you
     
  8. chief

    chief Member

    Connection to IMAP server failed.
     
  9. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    any pointers in your logfiles? please be aware, that some debug options of roundcube can reveal secrets.
     
  10. chief

    chief Member

    nothing.
    Im tailing the mail.log and nothing is being attempted. so must be the web.domain not getting there.
     
  11. chief

    chief Member

    ispconfig control panel -dns - zones- - records.
    mail ip is the same as web. shouldnt this be the ip of the mail server?
     
  12. chief

    chief Member

    so. if i ping mail.domain it returns web.domain (that webs ip). so, my dns records are out.?
    is it a case of changing the dns entry in control panel and editing the zones of domain and changing mail. to be the correct ip? of somewhere else.
    I have checked /etc/hosts on all machines and they are correct. or is it mysql entry thats wrong when i import sql query at install?
     
  13. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    or it is logging to syslog or maybe trying to log to its own log, depends on your setup, debian default would be mail.log though.
    Any login attempts in your mail.info any dovecot errors at service restart?
    Have you tried something like
    Code:
    <?php
    $user_id='[email protected]';
    $password='1234567woistmeinefraugeblieben';
    $server='localhost';
    
    if(false === imap_open('{'.$server.':143}INBOX', $user_id, $password) )
      echo "143 failed\n";
    else
      echo "143 OK\n";
    
    if(false === imap_open ('{'.$server.':110/pop3}INBOX', $user_id, $password) )
      echo "110 failed\n";
    else
      echo "110 OK\n";
    
    if(false === imap_open ('{'.$server.':993/imap/ssl}INBOX', $user_id, $password) )
      echo "993_strict failed\n";
    else
      echo "993_strict OK\n";
    
    if(false === imap_open ('{'.$server.':993/imap/ssl/novalidate-cert}INBOX', $user_id, $password) )
      echo "993_loose failed\n";
    else
      echo "993_loose OK\n";
    
    if(false === imap_open ('{'.$server.':995/pop3/ssl}', $user_id, $password))
      echo "995_strict failed\n";
    else
      echo "995_strict OK\n";
    
    if(false === imap_open ('{'.$server.':995/pop3/ssl/novalidate-cert}', $user_id, $password))
      echo "995_loose failed\n";
    else
      echo "995_loose OK\n";
    
    be aware that running this may lead to fail2ban banning you if the server (not you) think the login was invalid.

    edit: just seen your note about the mail-record. I don't know your configuration but you should be able to login to your local server regardless.

    There are MX-entries for domains specifying a fqdn as MX-server.
    This set fqdn is defined using A and/or AAAA records on the fqdns dns. So there usually should be an A record, yes.
     
  14. chief

    chief Member

    so. if i ping mail.domain it returns web.domain (that webs ip). so, my dns records are out.?
    is it a case of changing the dns entry in control panel and editing the zones of domain and changing mail. to be the correct ip? of somewhere else.
    I have checked /etc/hosts on all machines and they are correct. or is it mysql entry thats wrong when i import sql query at install?
     
  15. chief

    chief Member

    when i added a dns-zone via the wizard it got the A record mail IP wrong. where is this stored? in web/phpmyadmin?
     
  16. chief

    chief Member

    found this.
    [25-Jul-2018 18:35:30 +0100]: <c2gb37i9> IMAP Error: Login failed for dave@ domain from 79.79.62.1. Could not connect to <fqdn>:143: php_network_getaddresses: getaddrinfo failed: Name or service not known in /usr/share/roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (POST /webmail/?_task=login&_action=login)
     
  17. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer


    too bad I can only assume what you are doing and only can hardly guess what you need to do then.
    but looks like you need ot check your DNS entries, go to your zones and check them without the wizard.
     
  18. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you made a mistake entering IP address, use the ISPConfig Panel to correct it. The DNS-tab has the tools to edit zones.
    If you have two host, web and e-mail, they indeed must have different IP-addresses. You seem to check only with ping, use the command host to check name service info. Check the name service first, it is no use trying to connect to roundcube or website if the address is wrong and you connect to some other host.
     
  19. chief

    chief Member

    Hey, since last message i started again. i have enabled the debugging and am getting this error message.
    IMAP Error in /usr/share/roundcube/program/lib/Roundcube/rcube_imap.php (193): Login failed for [email protected] from 79.79.62.1. Could not connect to

    UPDATE..
    I remoted in to mail.tlsystems.co.uk and ls /var/vmail/ and the domain name is there, i then followed and can see the new folder containing a email i sent. so my issue is with roundcube accessing the mail server from the webserver..
     
    Last edited: Aug 4, 2018
  20. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I have roudcube installed on my mail server.
    Have you made sure the host names resolve to the correct IP-numbers? Check what you have in /etc/hosts in all your hosts.
     

Share This Page