Easy RoundCube (Over SSL) And Webmin With fail2ban For ISPConfig 3 On Debian Squeeze

Discussion in 'HOWTO-Related Questions' started by JohnnyBeGood, Mar 4, 2011.

  1. JohnnyBeGood

    JohnnyBeGood Member

    Hi,

    I was happy to see there's how-to on roundcube for Debian Squeeze and ISPconfig 3 because I couldn't get to work with squirrelmail http://www.howtoforge.com/forums/showthread.php?t=50797

    After following tutorial to a T I get this error
    when trying to access https://www.tld.com/webmail

    Code:
    Secure Connection Failed
    
          
              
    
    An error occurred during a connection to www.tld.com.
    
    SSL received a record that exceeded the maximum permissible length.
    
    (Error code: ssl_error_rx_record_too_long)
    
        
    
    
        *   The page you are trying to view can not be shown because the authenticity of the received data could not be verified.
    
        *   Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.
    
    
    What am I missing?

    Thanks in advance!
     
  2. 8omas

    8omas Member HowtoForge Supporter

    You have to type

    http://www.tld.com/webmail
    or
    https://www.tld.com:8080/webmail

    the same is for phpmyadmin or whatever else you set up following the guide

    The ssl is setup for port 8080
     
  3. JohnnyBeGood

    JohnnyBeGood Member

    I get same error when trying to access either one.
    Does ssl needs to be enabled somewhere?
     
  4. 8omas

    8omas Member HowtoForge Supporter

    In the beginning of the HowTo I mention :
    You HAVE to do those things to have SSL over port 8080. After that you can follow anyone of the 2 links in my previous post.
     
  5. 8omas

    8omas Member HowtoForge Supporter

  6. JohnnyBeGood

    JohnnyBeGood Member

    Sorry, I missed that step. I did not enable ssl. Since I'm supporter of this site I do have ISPconfig manual.

    No, I do not need SuExec.

    After enabling ssl now I'm able to access roundcube
    by typing http://www.tld.com/webmail which redirects me to https://www.tld.com:8080/webmail/ but I get the following error:

    DATABASE ERROR: CONNECTION FAILED!

    Unable to connect to the database!
    Please contact your server-administrator.


    If I remember correctly after I issued apt-get install roundcube command it asked if I wanted to auto configure DB, I selected no, I can't quote exact phrase but it was confusing and I thought it would mess up ISPconfig DB.
     
  7. 8omas

    8omas Member HowtoForge Supporter

    This step would simply create the necessary roundcube db. It would ask for a user and a pass.
    Remove (purge) and reinstall round cube
     
  8. 8omas

    8omas Member HowtoForge Supporter

    Maybe I must include this to the guide.
    When you run apt-get install roundcube, then you'll be asked about the database system to use (I use mysql). After that you'll be asked for the password of the db admin user (usually root). At the end you'll be asked for the password of roundcube database (the db-config system will create the roundcube database and the roundcube user)

    If all the above do not help (and you cannot recreate or configure the db) then:
    Code:
    apt-get remove --purge roundcube roundcube-mysql
    apt-get install  roundcube roundcube-mysql
    dpkg-reconfigure roundcube-core
    The last one will ask you a lot of questions (assuming that you install on a single server installation, I 'll post some possible answers):
    1) ... IMAP = leave blank or enter localhost or even your server's full hostname
    2) language = whatever you want
    3) Reinstall database? = Yes
    4) Database type = mysql
    5) Connection method = unix socket
    6) Name of the database's administrative user root (almost always .. few people changes this)
    7) root password = the administrative user's password (this is needed to create the roundcube db and user)
    8) username for roundcube = roundcube (or whatever you want)
    9) database name for roundcube = roundcube (or whatever you want)
    10) Web server(s) to configure automatically = apache2 (possibly)

    If you already created the db, then in the last step you'll get an error. Ignore it, remove the db (roundcube's db) and the roundcube user, with the phpmyadmin and rerun the dpkg-reconfigure roundcube-core.
     
    Last edited: Mar 5, 2011
  9. JohnnyBeGood

    JohnnyBeGood Member

    Thank you!
    I works now. Finally webmail works because I gave up on trying to get SquirrelMail to work with ISPconfig.
    Attached is the step that I messed up and selected "No"
    If you can please edit your tutorial and add above instructions it might help some newbie like me :D
     

    Attached Files:

  10. 8omas

    8omas Member HowtoForge Supporter

    You are right. After your previous post, I realized this and I already updated the guide.
    Thanks for the suggestion
     
  11. tazmon95

    tazmon95 New Member

    Hello,

    I've followed the main tutorial on how to set this up and I've gone through the steps of this post twice now and am getting the same error. It looks like everything should work, but when I get to the Roundcube login page and put in my user information, I get a red box that momentarily popup saying:
    After doing more troubleshooting, I found that if I leave the
    in the /var/lib/roundcube/config/main.inc.php file blank like this
    I get a new box for server under the username and password on my login page. I've tried all the different server names I can think of which are setup in my ISPConfig3 panel, however I keep getting a red box saying:
    Any help with this would be much appreciated.

    Thanks,
    ~Taz
     
  12. 8omas

    8omas Member HowtoForge Supporter

    Did you set the variable:
    Code:
    auto_create_user = TRUE;
    in /var/lib/roundcube/config/main.inc.php ?

    Are you sure that you set up correctly the mail server?
    The new box that appeared, gives you the ability to choose the mail server to login. If the mail server is local (as the manual assumes) then the localhost is correct.

    Please verify that you set the auto_create_user to TRUE
     
  13. tazmon95

    tazmon95 New Member

    I'm not 100% sure I setup the mail server correct, but everything else seems to be working ok.
    This line was already in my /var/lib/roundcube/config/main.inc.php file. Do I need to write it differently?
     
  14. 8omas

    8omas Member HowtoForge Supporter

    Do you have the port 143 open on localhost?

    what is the output of:
    Code:
    netstat -taun | grep LISTEN
     
  15. tazmon95

    tazmon95 New Member

    That's a new file for me and I'm not sure how to read it's output:
    I only see a tcp6 line with 143 on it.
     
  16. 8omas

    8omas Member HowtoForge Supporter

    Me too. So you probably must open the port 143 for tcp/ip v4. If you manage your firewall through ISPconfig then you must go to:
    System -> Firewall and add the port 143 to you open ports.
     
  17. 8omas

    8omas Member HowtoForge Supporter

    I think that with ipv6 listening on port 143, the situation is the same. So in simple words, your server is listening.

    Keep in mind that
    1) You must have a working mail (e.g. [email protected] -- create it through panel)
    2) Your login name must be that one ([email protected] --enter it in the user name field of roundcube)
    3) The roundcube and courier must be correctly installed.

    If you are not sure about roundcube rerun
    Code:
    dpkg-reconfigure roundcube-core
    For courier follow the perfect server
     
  18. tazmon95

    tazmon95 New Member

    8omas, Thanks for helping. I was finally able to login. The main part I was missing was the @mydomain.com from the username.

    Also, I can't use Localhost as my server. It still tells me it can't connect to the IMAP server, however if I use the domain name it works. Is there any reason this could be an issue and cause problems later on?
     
  19. tazmon95

    tazmon95 New Member

    just figured it out. It was my /etc/hosts file. I needed to have localhosts separaate on the 127.0.0.1 line

    like that.
     
  20. T1mur

    T1mur New Member

    Hi

    i got instaled roundcube like in tutorial.

    got small problem and have no idea how to resolve it...
    after http://my.domain.org/webmail/ i got

    CONFIGURATION ERROR
    main.inc.php was not found.
    Please read the INSTALL instructions!

    what i did wrong after apt-get installation ?

    is the owner of main.inc.php should be root ?

    root@ns38685:/usr/share/roundcube# ls -l

    drwxr-xr-x 2 root root 4096 Jun 22 13:12 bin
    lrwxrwxrwx 1 root root 25 Jun 22 13:12 config -> /var/lib/roundcube/config
    -rw-r--r-- 1 root root 9829 Oct 31 2009 index.php
    lrwxrwxrwx 1 root root 23 Jun 22 13:12 logs -> /var/lib/roundcube/logs
    -rw-r--r-- 1 root root 18294 Oct 18 2010 main.inc.php.dist
    lrwxrwxrwx 1 root root 26 Jun 22 13:12 plugins -> /var/lib/roundcube/plugins
    drwxr-xr-x 7 root root 4096 Jun 22 13:12 program
    -rw-r--r-- 1 root root 26 Mar 22 2008 robots.txt
    lrwxrwxrwx 1 root root 24 Jun 22 13:12 skins -> /var/lib/roundcube/skins
    lrwxrwxrwx 1 root root 23 Jun 22 13:12 temp -> /var/lib/roundcube/temp

    /usr/share/roundcube/config# ls -l

    lrwxrwxrwx 1 root root 25 Jun 22 13:12 db.inc.php -> /etc/roundcube/db.inc.php
    lrwxrwxrwx 1 root root 27 Jun 22 13:12 main.inc.php -> /etc/roundcube/main.inc.php
    lrwxrwxrwx 1 root root 28 Jun 22 13:12 mimetypes.php -> /etc/roundcube/mimetypes.php

    thxnks.
     

Share This Page