Twitter: just got back to the hotel with @mpulido and crew. friend him, he got turned down by the [...]
Subscribe via RSS or email  #7,234


HOW TO: Setup RoundCube Webmail on Your Server

Oct 29, 2005 in ,

roundcube

I recently heard about a new webmail client from my friend Justin, who’s infatuated with it. RoundCube, a “browser-based multilingual IMAP client with an application-like user interface,” is the latest and greatest webmail client. It’s only in the alpha stage of development, which explains the jagged installation procedures, but that doesn’t mean it can’t kick some major squirrels. RoundCube is much smaller, scalable, and less resource intensive than another competitor, Zimbra, which weighs in at 150 megabytes. The interface is the stunning with lots of AJAX magic as well as user configurable via XHTML and CSS 2 skinning. I love RoundCube so much, I’m declaring it better than Gmail. Yes, you read that correctly. Hopefully by the end of this article you will have a fully functioning RoundCube webmail client on your server.

Why You Want To Install It

Take a look at some of the screenshots. It’s just as great as it looks once its on your server. I recommend you start with a RoundCube Demo. Please keep in mind the demo is heavily used and will be slow. It will be much faster on your own server. It’s got lots of the new-fangled web programming language-hybrid, AJAX, which is an acronym for Asynchronous Javascript And XML. A strong feature that AJAX totes is being able to send and receive little bits and pieces of data without having to reload the page, making for clean page transitions in RoundCube. Also the AJAX in RoundCube makes a nice floating, translucent banner on the top of the page when it is loading or has an error to display. Check out this article on Adaptive Path if you want to find out more about AJAX. Still not blown away by RoundCube? Check out Mark Boulton’s review.

Before we begin the installation there are some things you are going to need.

  • PHP and MySQL support on your server
  • An FTP client or some other way of uploading files to your server
  • Access to a terminal or command line application if you want the latest CVS build of RoundCube
  • Installation

    I will show you how to install the CVS build of RoundCube. However, if you would like a simpler way to get the files, go to this page on RoundCube and download the latest release. If you are willing to continue with the CVS download, open up a terminal. Copy and paste the following command into your terminal.

    cvs -z3 -d:pserver:anonymous@roundcube.cvs.sourceforge.net:/cvsroot/roundcubemail co -P roundcubemail

    This will automatically download the latest CVS build of the “roundcubemail” folder to your home directory. If you look inside of these folders you will see that CVS has put many files and directories all over the place (I counted 46) to keep track of things. This really just makes it slower for you to upload to your server, so you may consider deleting those before you upload it. For those of you that downloaded the tar.gz version, unzip that in your favorite decompression utility or use the terminal command tar xzf [roundcube].tar.gz

    CVS doing its thing.
    The CVS command doing its thing.

    Open up the roundcubemail folder and navigate to the config folder. In here you will find two files, db.inc.php.dist and main.inc.php.dist. Rename both of them to remove .dist. You now have db.inc.php and main.inc.php.

    Config Files

    Before we proceed, you are going to have to edit a few things in these two files. First, you need to login to your web host’s control panel so that you can create the new MySQL database that RoundCube requires. This varies greatly between hosting services, so I cannot go into too much detail. However, for Media Temple shared server customers you log into accountcenter.mediatemple.net and click on MySQL Databases in the left sidepanel and then Create Databases. Keep your browser open to this page as we are going to use it again.

    In the dialog that loads, type in the name of the database you would like to use for RoundCube. Once you’ve completed that make sure to copy the full name of the database. Most web hosts, especially on shared servers, prepend your websites name to the database name. The login and password for the MySQL database will usually be the same one you used to log into the control panel with. If not, you can contact your hosting provider and they will gladly give you that piece of information. You should probably check the emails you received when you purchased the hosting first.

    Now we can begin editing the configuration files. Open db.inc.php in a text editor. The only thing we are concerned about right now is giving RoundCube a way to access our newly created database. It’s going to need to know your login information. Find the line that says

    $rcmail_config['db_dsnw']='mysql:// roundcube:pass@localhost/roundcubemail';

    You are going to replace the part that says roundcube with your database login and pass with the database password. The localhost should remain the same on most configurations. The last thing to change is roundcubemail by replacing it with your database’s full name. That’s all we need to edit in this file, so now we can save and close it.

    Open main.inc.php in a text editor and change the items below to the values I have listed. We will be adding a value to default_host so that we don’t have to type it into RoundCube everytime we want to access email. It will just use localhost as the default. The session time is 10 minutes by default, but I like keeping it at 30 minutes. I’ve noticed that if you write an email and try to send it after those 10 minutes it will go back to the login page and lose your email; probably a small bug for now. The next two just change the way the dates are display and is more of a preference than anything else; it’s not necessary. Visit this page on php.net to see the parameters for setting up the date formats. The next part with useragent also isn’t necessary but it makes me happy. And then the last thing to edit is your timezone. I put -5 as I currently reside on the East Coast, so it depends where you live.

    // the mail host chosen to perform the log-in
    // leave blank to show a textbox at login, give a list of hosts
    // to display a pulldown menu or set one host as string.
    // To use SSL connection, enter ssl://hostname:993
    $rcmail_config['default_host'] = 'localhost';
    // session lifetime in minutes
    $rcmail_config['session_lifetime'] = 30;
    // use this format for short date display
    $rcmail_config['date_short'] = 'l g:i A';
    // use this format for detailed date/time formatting
    $rcmail_config['date_long'] = 'm/d/Y g:i A';
    // add this user-agent to message headers when sending
    $rcmail_config['useragent'] = 'RoundCube Webmail';
    // use this timezone to display date/time
    $rcmail_config['timezone'] = -5;

    Save the file and exit your text editor. Now that we are done configuring some things, you can upload the roundcubemail folder to your webserver. There are a few things to note. You are able to rename the folder to anything you likely without affecting the operation of RoundCube, which is nice to know because typing www.myurl.com/roundcubemail can get annoying. Renaming it to something like mail should be just fine. Fire up your FTP program and upload the folder to the root of your html directory. Note for (mt) customers: If you put your folder in the root of the html directory and name it mail.yoursite.com, roundcube will be accessible via that sub-domain; http://mail.yoursite.com. You can read up on creating a sub-domain on (mt)’s Knowledge Base.

    After the upload has completed, use your FTP program to chmod the temp and logs directories to 777. This is generally done by right clicking on the directory and then selecting info, edit or chmod. You can also chmod them with chmod -R 777 [dir] via command line if you are so inclined.

    You’re one step away from playing around with RoundCube. You need to create the tables required by RoundCube in your database. Go back into that open brower you had on the control panel page of your web host and look for a phpMyAdmin link. PhpMyAdmin is a fantastic MySQL database management tool and is pretty much the industry standard. For Media Temple customers, you can find phpMyAdmin under MySQL Databases. When you find the link, click it and log into phpMyAdmin. There will be a dropdown menu on the left pane; click on it and select your RoundCube database.

    Then, click on the SQL tab. There will be an empty box labeled Run SQL query/queries on database. In this box you are going to paste the contents of the mysql.initial.sql file located in the roundcube folder within the SQL folder.

    Once that has been pasted, click the Go button.


    This is what you should get.

    RoundCube cannot create new email users, that is done by your host. If you do not like the default email address given to you, as in it has your full name and you just want to use your first name (as was the case with me), go back to your web host’s control panel. Look for a link to adding a user. Most of the time just adding a user gives that user an email address as well. If you’re using Media Temple, expand Email/Users and then click on Add User. Fill out information on that page and click save. Your email login information should be the name of the user you just created and the password will be the same as the what you used to login to the control panel.

    Moment of Truth

    You should now be able to access your RoundCube installation by pointing your browser to the directory where you placed your roundcube folder. Once the page has loaded, login and don’t forget to append your domain to the end of your login name. For example, your login will be yourname@yourdomain.com.

    RoundCube Login Page
    You should be greeted by a page like this.

    RoundCube Tweaks

    Click on Personal Settings, then the Identities tab. Double-click on the email entry it has for you and add your name as well as any other info you wish to provide and save. From there you may click New Identity if you wish to send emails that appear to be from one of your other email addresses. Click on the Folders tab and create any folders you want to organize your emails. Also, make sure RoundCube has the proper time zone in the Preferences tab.


    Before you go, we need to test RoundCube. Send an email to your RoundCube managed email address from another email account and try to send one from RoundCube.

    Everything should work fine, unless your web host has PHP Safe Mode enabled which means that PHP’s mail() function may not, uh, function. Don’t worry, there’s a good alternative. Instead of using PHP to send your email you can route it through an external smtp service, which is only marginally slower than PHP mail(). Open your main.inc.php in a text editor and look for the following entries:

    // use this host for sending mails.
    // if left blank, the PHP mail() function is used
    $rcmail_config['smtp_server'] = '';
    // SMTP username (if required) if you use %u as the username RoundCube
    // will use the current username for login
    $rcmail_config['smtp_user'] = '';
    // SMTP password (if required) if you use %p as the password RoundCube
    // will use the current user's password for login
    $rcmail_config['smtp_pass'] = '';
    // SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
    // best server supported one)
    $rcmail_config['smtp_auth_type'] = '';

    You should contact your web host to find out the information for the first entry, smtp_server, but I just used localhost and it worked fine. Update: Media Temple just responded to my inquiry, and the real location is mail.paulstamatiou.com, so for other (mt) customers it should be the same format. The next two entries are likely going to be the same as the login/password you used to get into the web host’s control panel, so you can enter in %u and %p respectively. The last entry is usually best left alone, unless your web host says otherwise. Once you fill that information in and save the file, hopefully RoundCube will be happy.

    Now that you have the time and ability to play around with RoundCube, I suggest getting to know the Address Book. Currently, it is very simple but will soon be able to store and receive contacts in the popular vCard format and keep track of more information than just their name and email address. I like it better than Gmail, which automatically adds people to your contacts if you send them an email once. Keep in mind that this is an Alpha release, promising you much more in the future. Visit RoundCube often to keep tabs on newer versions and the roadmap to see what’s in store for the future of RoundCube. When a new version is released simply download it and overwrite all files in your roundcube folder except the config files. Make sure that the temp and logs directories are still chmod 777. Don’t take me for granted on that, you might have to keep the temp files as well. I’ll probably update this article when a new version of RoundCube comes out and I get the change to upgrade my installation.

    CSS Modifications

    Navigate to skins>default within your roundcube folder. This directory contains all of the images and CSS files that determine how RoundCube’s GUI looks. There are way too many things that could be edited to cover, so I’ll just get you started. Open up mail.css and look for #messagelist tr.selected td. The attribute background-color is responsible for the color of a selected email. By default it is a deep red #CC3333, however, I prefer blue over red so I put in a value of #3388CC. Save that and then open up common.css and add the same color value, #3388CC, to background-color for table.records-table tr.selected td and #rcmKSearchpane ul li.selected. I also decided to change the “loading” message to blue from gray. I changed background-color in #message div.loading to a light blue, #AFD7F8, and border to #3388CC. Save again.

    If you want to change the color of something in particular, find out what the hex code for that color is likely going to be (e.g., a dark gray would likely be #333333) and then search for it. Once you find it, replace it with the color you want. If you don’t know what you are doing, you shouldn’t really be playing around in the CSS files. For example, if you want to keep the original color commented out but you use only //, RoundCube won’t load properly. The correct way to comment out would be using /* */. The CSS files for RoundCube are lengthy and complex, so trial and error alone would take time. That being said, I’ll try to update this once I’ve hacked around with the CSS some more.

    I decided to brand my installation of RoundCube while I was in the customizing the CSS. By branding I mean changing the RoundCube logo image to something that pertains more to you. I opened up the roundcube_logo.gif in skins/default/images/ in my beloved Photoshop CS2. You can do the same thing. Edit the logo however you like and save it in gif, png, and a grayscale gif for the print CSS.

    I also personalized the log out message. If you would like to do the same or edit any other messages, find the messages.inc file in /program/localization/en/. Edit the $messages['loggedout'] entry as you please and then save. Mine now reads You have successfully logged out of PaulStamatiou.com. Good bye!

    Fini

    I hope you learned as much about RoundCube in this article as I did while writing it. The first time I touched RoundCube was today, so all this is new to me too. I really do believe that RoundCube has some massive potential. Given an active developer community on SourceForge, I expect RoundCube will be up-to-speed with competiting webmail applications shortly. It blows the doors off of the industry standard, SquirrelMail, which has a hideous user interface. If you enjoyed this article, please contact me. I love hearing from my readers. I’m always open to suggestions for review or how-to articles. If you should have any further RoundCube questions, the RoundCube forum is an excellent resource.

    Here’s an adaptation of my article for setting up RoundCube on FreeBSD.

    14 people have saved this post on del.icio.us. Why not bookmark it?




    236 Comments

    1. nice. really nice. maybe ill do this on my G5 with your writeup. ive got squirrel, horde and neomail options on my host, all of which are very painful.

    2. I’ve managed to bungle this somehow. When I try to access roundcube on my server, I receive the following errors:

      Warning: main(include/rcube_shared.inc): failed to open stream: No such file or directory in /home/.sagebrush/sevinch/machinechicago.com/roundcube/index.php on line 66

      Fatal error: main(): Failed opening required ‘include/rcube_shared.inc’ (include_path=’./:/dh/cgi-system/program:/dh/cgi-system/program/lib:.:/usr/local/lib/php’) in /home/.sagebrush/sevinch/machinechicago.com/roundcube/index.php on line 66

      Any advice would be much appreciated! I’ve been using squirrel for years, and have longed from something better. RoundCube looks to be the solution!

    3. If you don’t want the cvs control files (which will let you sync your check with any future changes that the RoundCube developers make), ues the ‘export’ command instead:
      cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/roundcubemail export -P roundcubemail

    4. DCE: I think that might be a PHP-related error. Do you have php power mode on? Power mode tries to mimic real php by using cgi, but it is slower and usually fails at the more advanced tasks as RoundCube is on the cutting edge of PHP, even compatible with PHP5. If it’s not a PHP issue, I’m not too sure what to say. Try to talk to your web hosting provider about your situation, or find out what versions of PHP and MySQL you are running.

    5. It seems I’m not the only person on my host (Dreamhost) to run into problems. I’m going to keep watching their user forums to see how it all pans out.

      Thanks!

    6. DCE, I found the following information to be helpful:


      In your index.php, change line 48 from:
      $CURRENT_PATH=dirname($_SERVER[’script_FILENAME’]);
      to
      $CURRENT_PATH=dirname(__FILE__);
      (that should be double-underscores around FILE in the new line. Live preview at least is interpreting them as an )

    7. Better than Gmail? It’ll have to get proper threaded conversations and, y’know. *search* before it touches gmail.

    8. Sweet write up, Got it up and running in about 15 minutes. Your HOW-TO’s rock.

    9. I think I should have done a HOW TO. I just recently posted an article about RoundCube on my blog.

    10. Please contact the authors, it is possible to craft XSS addresses in their address book.

      Regards,

      Hans

    11. I’ve put together simple,
      step-by-step instructions that overcome all the difficulties I had installed Roundcube on Dreamhost

      They’re tested and work as of the following version: roundcube_webmail_0.1-20051021.tar.gz

    12. Thanks Jed! Many people have contacted me with Dreamhost issues, but I’ve got no idea how to go about fixing those as I’m a happy (mt) customer ;-).

    13. Well done, great article, keep up the good work!

    14. I have been running Roundcube for some time now. The first release did not work with my Qmail installation, but their latest one works perfectly. (A few errors display sometimes in the top corner, but nothing that restricts use at all).

      I absolutley love it. The only downside is, the interface does not degrade on non js browsers, so I cannot use it on my cell phone.

      Nice guide, I am sure it will help out al ot of people! Qmail rocks!!!

    15. Did anyone try to setup one single RoundCube for multiple domains?

    16. Working great, I also use hula, but this will do for this domain. Thanks :-)

    17. Hello,

      I am having a little problem.

      Only one user, the first one created in the control panel is able to log in. All users created afterwards are not able to login.
      I have diuble checked user names and passwords.

      Trey

    18. Trey: What web hosting provider are you using? I know that with my Media Temple service, I can create up to 100 users, and all of them will be able to access RoundCube. I have just tested this and they are all able to login, send, receive email. Does your webhost allow more than one user/email address?

    19. I figured it out. I was playing around and had set “create account on login
      to false. I set it back to true and they are working now.

      Sorry for the trouble.

    20. Ooo, this is some beautiful stuff. I’ve just set this up on my server, and I must say your directions were great. Thanks for the info!

    21. Thanks Jalenack. I’ve been following your site too… seen you around the Mint forums quite a bit!

    22. great, nice tutorial, all right with the nice script

    23. I am running on (mt) but on a cold-fusion server (which has PHP), I am also receiving this error:

      Warning: main(lib/imap.inc): failed to open stream: No such file or directory in /home/httpd/vhosts/medianueva.com/subdomains/mail/httpdocs/program/include/rcube_imap.inc on line 24

      Fatal error: main(): Failed opening required ‘lib/imap.inc’ (include_path=’./:/home/httpd/vhosts/medianueva.com/subdomains/mail/httpdocs/program:/home/httpd/vhosts/medianueva.com/subdomains/mail/httpdocs/program/lib:.:/usr/share/pear’) in /home/httpd/vhosts/medianueva.com/subdomains/mail/httpdocs/program/include/rcube_imap.inc on line 24

      I tried the solution recommended by Gustavus with no luck. Any other suggestions?

      Thanks in advance!

    24. Great howto, worked fine with my FreeBSD, postfix, mysql, courier-imap install.
      Got it up and running within about 15 mines.
      I got the lastest CVS release, and there are no problems so far, although it doesn’t seem to like emails with large attachements about 800kb .
      I don’t know where to ask about this, i thought that since it was in alpha release that i would just wait.

      Thanks for the How To

    25. Read w/ interest your how to on “Round Cube”. I had been looking at Zimbra but found it
      to bloted for our use. I are thinking about hosting “Round Cube” our own mail server located
      in our own facililty as a test bed.

      Your “how to” seemed to be slanted toward co-hosted server locations not in-house which brings
      me to the point of my questions.

      1- how would we add/remove users & their eMail accounts from the system
      2 - does it need to use port 80. Can that be altered to SSL port. Reason - we are behind a
      hardware firewall and port 80 is forwarded to our web server
      3 - what does it use for SMTP service. Hopefully not ISP SMTP server

      Thanks For The Information
      Don

    26. Anyone know how to change the title of the page through out the entire program, so that it says something custom, other than RoundCube | Mail ?

    27. Paul
      Very nice - I had written a similar article, staying strickly with command line work on FreeBSD 6.0 - but there’s really nothing that wouldn’t translate to Linux or OS X; save for a couple of paths:

      HOWTO: Install Roundcube Webmail from CVS on FreeBSD

      Also I’ve been on their mailing list now, and it’s quite active. I plan on reporting bugs and sub’ing some patches soon. Your comment on RC over Squirrelmail is spot on, but also RC doesn’t overwhelm you with options like Horde/IMP either - I just LOVE the ui!

      fak3r

    28. Got the lastest CVS version working on my system. I have a few issues to report…

      1) the .htaccess was causing an “Internal Error 500″ on my system. I don’t know enough about it yet to modify, so I just deleted it and it worked fine.

      2) I have nearly 700 mails in my IMAP inbox… and the interface Crawls with that. I set up a temporary box and with 10 or so e-mails, it is much, much faster.

      3) I can not read anything other than the very first mail on the list (The latest with the default sort). If I double click any other e-mail including the first e-mail on the second page, the page just refreshed itself. This is the real deal-breaker for me now. I tried this on Firefox and IE (on PC) and Safari (on Mac) same deal each time.

      4) The sourceforge Bug list and Support list did not work for me today?!?, so I could not post or read the contents of any of the bugs on it.

      I am using 1and1.com for hosting. I don’t know what version of Linux or e-mail server they are using. But I hope someone here would know.

    29. Thanks, Paul.

      I have been having a nightmare with accessing my webmail… and came across RoundCube. I initially dismissed it as it looked scary, but reading your run-through made me think “Why Not!”. Really few minutes later, and it is up and running. I even braved the chmod 777 thing (although I cheated and used my FTP prog!)

      Just one question, and it is really for the RoundCube people: does anyone know how to get themail to sort in an order of your choice, such as by name or by date?

      Richard

    30. An update: I used the tar.gz from the website, not the cvs. The version I see does not have the up/down arrows by the column headers that are visible in your screen shots. I wonder if this feature is not in the last tar.gz released and that I need to use the cvs. I’ll try when I have time & let you know.

      R

    31. Hello,

      I have followed the tutorial to install RoundCube until MySQL Databases. But there is something that i don’t understand. I have my own server and i don’t know how to create new user to be able to configure RoundCube after. I have tried unix password but it’s don’t work.
      Thanks in advance for your help :-)

    32. Hi Jean-Luc,

      you need to authenticate yourself with a valid imap user.

      Good Luck,

      Andreas

    33. Hi,

      my installation works fine, but everytime I login I get this annoying warning:

      Warning: fopen(logs/errors): failed to open stream: No such file or directory in /var/www/localhost/htdocs/roundcubemail/program/include/bugs.inc on line 70DB Error in /var/www/localhost/htdocs/roundcubemail/program/include/rcube_db.inc (148): DB Error: unknown error; QUERY: INSERT INTO cache(created, user_id, session_id, cache_key, data)VALUES (now(), ?, ?, ?, ?)

      For me, the mysql statement seems to be not correct, should now() be a php function? And what about the question marks in the statement? Anyone else with this?

      Thanks

      Andreas

    34. Do you know how to change the index title?

    35. Ok, I might be stupid, but after following the instructions I still got:

      DB Error in /Library/WebServer/Documents/bergvall/mail/program/include/rcube_db.inc (63): DB Error: connect failed

      Fatal error: Call to undefined function: query() in /Library/WebServer/Documents/bergvall/mail/program/include/rcube_db.inc on line 124

      Does anyone have any idea what I’ve done wrong?

    36. Hello,

      I have followed the tutorial to install RoundCube, but everytime I login I get this error.

      The page cannot be displayed. The page you are looking for cannot be displayed because the page address is incorrect.

      Thanks in advance for your help.

      Namit

    37. I am running my own IIS6 and Mailenable (free version) for my SMTP. The mail enable helps with relay security and multiple domain management. Anyway, there is not a IMAP server as part of the MailEnable free package. Can’t I just use SMTP ??? Everything resides on the same machine Server2003/IIS6 .

      Don

    38. Hi

      Followed your tutorial and everything seemed to go just fine.

      However when I attemp to send mail it say I could not because of an smtp error? Odd my other web mail system seems ok with the current setup.

      I used the %u %p options and also tried the various authentication methods. However no luck.

      If you can think of anything I have missed i would apprecaite the time.

      Regards

      yogiman

    39. Good job!
      I’m not a techie, and I got it up and running lika a charm. One question though: is there any way I can have french as the default interface for all users?

      thanks,

      Paolo

    40. I think there is a way in a config file, I’ll have to dig deeper.

    41. hey,
      thanks for this info.
      I just set it up. I have mysql, php, pear enabled and am running a blog already.

      But I keep getting a 500 internal server error and unable to complete your request. I am hosting on Advanced Network Hosts.

      Any ideas?

    42. this is the error i got from the error log - what is the issue here?

      15:44 2005] [alert] [client xx.xx.xxx.xxx] /home/vrittin/public_html/rcm/.htaccess: Invalid command ‘php_flag’, perhaps mis-spelled or defined by a module not included in the server configuration

      Thank you in advance.

    43. thank you for this very good tutorial. I installed it and it work fine, but got the error:

      when click the name next to the “Sender”, or under the “Sender” field, which link to the source (from) address, it will display a DB error liks this:

      … FROM contacts WHERE user id=1 AND del!=’1′ AND contact_id IN (test3@d309b.lan)

      any suggestion to sort out this problem?

      Thank you

    44. This is a weird error. I did everything listed in this install page, and when I try to access roundcube, I get:

      Webmail Not Enabled
      Webmail is not enabled for this server. Please contact your system administrator.

      any ideas?

      FYI: this is a private server using OS X 10.4 Server.

      Jonathan Reinfelds on Dec 1st, 2005 at 1:44 am
    45. Like Sven Bergvall in comment 36 I get this same error:

      DB Error in /Library/WebServer/Documents/wm/program/include/rcube_db.inc (63): DB Error: connect failed

      Fatal error: Call to undefined function: query() in /Library/WebServer/Documents/wm/program/include/rcube_db.inc on line 124

      I am using OS X 10.4.3 on a Macmini which serves as server.

    46. Ok… got roundcube setup and seni-working. To fix my issues, I basically ripped everything out and redid everything from scratch, and it worked…. sort of. I have one issue now. My users can not read their japanese e-mails. The browsers are set for japanese content, and roundcube language is set to ‘ja’ so, that “should” make it work, but the japanese still isn’t showing. The japanese menus show fine, it is just the actual messages that don’t show properly. ideas?

      Jonathan Reinfelds on Dec 3rd, 2005 at 3:37 pm
    47. To Eric Le Baron
      Hi Eric. I also use OS X as my server platform. I followed the instructions here to the letter and it finally worked for me (minus my issue posted above). The only thing I can think of is to check your connection line in main.inc.php. Here’s what mine looks like.
      $rcmail_config['db_dsnw']=’mysql:// u_rcmail:******@localhost/db_roundcubemail’;
      Hope that helps.

      Jonathan Reinfelds on Dec 3rd, 2005 at 4:02 pm
    48. To Jonathan Reinfelds

      Ok, found that $rcmail_config[’db_dsnw’] in db.inc.php
      Changed
      $rcmail_config[’db_dsnw’]=’mysql:// u_rcmail:******@localhost/db_roundcubemail’;
      into
      $rcmail_config[’db_dsnw’]=’mysql://:@localhost/db_roundcubemail’;
      Looks like the database is not password protected?

      Now it works, at least it opens now in Safari.
      When I try to open a mail with a 4MB attachment it comes up with some errors starting with:
      DB Error in /Library/WebServer/Documents/wm/program/include/rcube_db.inc (129): DB Error: unknown error
      DB Error in /Library/WebServer/Documents/wm/program/include/rcube_db.inc (204): DB Error: unknown error Query: INSERT INTO cache (created, user_id, session_id, cache_key, data) VALUES (NOW(), 1, ‘706de4d761ccac62fd0de3d1c7212a69′, ‘mid:1′, ‘Subject: RE: Hello Eric X-Priority: 3 (Normal) Date: Tue, 24 May 2005 22:12:41 0200 To:

      When choosing a different folder and then going back to the previously selected folder no mail is shown although there is mail in that folder.
      Only when I either log out and log in again or refresh/reload the window or go to address book and back this mail is shown.
      It seems to happen when Nederlands is used as language????
      With English it does not happen.

      Opening an email takes about 20-30 seconds.
      Is that normal?
      Same for switching back to folder.
      Selecting a folder makes all the mail appear in about 2 seconds.
      The server is a Macmini and Roundcube is accessed from a Powerbook.
      Both connected to the same router.

      Sometimes the content of a column (like Sender) overlaps the next one (Date).

      Thanks Jonathan for pointing me in the right direction.

    49. Hi Paul,

      wow. thanks for the info! That setup/customization/etc was easy and quick. And RoundCube is totally worth it. It’s one of the nicest webmail tools I’ve seen yet. Please post more stuff like that. :)

      thanks,
      ajit

    50. >> Rename both of them to remove .dist. You now have db.inc.php and main.inc.php.

      This leaves no backups of the original .dist files.
      It would be better to copy and rename the .dist files.

      Nice article.

    51. I saw a couple of people with a similar problem. Apparently, on some servers there is an issue with the php flags in the .htaccess file included in the roundcube package. Once the the directives, which begin with “php_”, are removed, the roundcube index loads properly. However, roundcube’s login depends on the at least two of these directives (the ones dealing with sessions) and returns an error about invalid sessions when you attempt to login. I have yet to find a work-around or even a source of the problem, but I’ll keep looking and post anything I found here. This is just to let those of you who are experiencing this know that’s it’s not something you did wrong.

    52. That was quicker than I expected. I appears that the cause of the Error 500 Intenal Server Errors is related to the setting of AllowOverride in the server’s http.conf. In order to set php directives from within .htaccess, as RoundCube’s .htaccess attempts to do, AllowOverride Options is required at the minimum. Unfortunately, AllowOverride can only be set from within http.conf which is only accessible via administrative priveledges. In other words, if you’re having this problem, you’ll have to talk to your host’s server admin, but it’s not likely that they will be willing to change the setting since it’s related to security. You never know though. Frankly, I think RoundCube should simply find a better way to handle this.

    53. Awesome system. Easy install (no problems for me using apache 2.0, php4, mysql-server-4.1 on Debian Sarge 3.1) and a lovely system to use. I’m running this in parallel with squirrelmail once I make sure there are no bugs. Once done I’m keeping it :)

      Excellent product. Good work

    54. OUCH !!

      It seems that RouncCube webmail will only work if your web server is running PHP as an Apache module. This is why ABHI and I both get the following error:

      “Invalid command ‘php_flag’, perhaps mis-spelled or defined by a module not included in the server configuration”

      Specifically, my web server is running PHP using a Server API of “CGI” and not “mod_php for Apache”. The output from phpinfo() will show this on your server as well. Just create a file named phpinfo.php and put these lines inside:

      Then upload it to your site and pull up the URL to it in your browser.

      Fortunately there is a workaround. Just comment out these lines in roundcubeemail/.htaccess

      #php_flag display_errors On
      #php_value session.gc_maxlifetime 21600
      #php_value session.gc_divisor 500
      #php_value upload_max_filesize 2m

    55. I’m surprised commenting out the PHP flags worked for you Chris. My RoundCube dist refused to login without them. I eventually had to simply delete the .htaccess file provided. Then everything loaded fine. If you need an .htaccess file in the RoundCube directory, then simply don’t include the default RoundCube directives. It’ll still work.

    56. Installed roundcube on my dreamhost site last week and it’s been working great. Wonderful stuff, though of course quite bare bones at present.

      My question:

      Can anybody tell me how to set the default server so that I don’t have to type it every time I want to login? I tried to follow the directions above but it made no difference.

      Thanks!
      Pete

    57. Pete,

      You’re gonna smack yourself :)… Your question is answered on this very page in the installation instructions. Look for the paragraph that begins:

      “Open main.inc.php in a text editor and change the items below to the values I have listed. We will be adding a value to default_host so that we don’t have to type it into RoundCube everytime we want to access email.”

    58. Chris,

      I must have done something wrong the first time because after trying again it works perfectly! Thanks for making me go back…

    59. First off—Thanks for the awesome instructions!
      I too, was struggling with installing on Mac OS X 10.4.3 and thought what I found out might help other users here. This is only for people using the default installations of mysql and php.

      There are two unique problems which made it very difficult to debug.
      Problem 1: By default, Tiger server is NOT set up to connect PHP and MySQL. The mysql socket that is pointed to by php is in the wrong place for the default Apple configuration. You need to do the following:

      sudo cp /etc/php.ini.default /etc/php.ini
      open /etc/php.ini in a text editor of your choice
      find mysql.default_socket =
      and change it to mysql.default_socket = /var/mysql/mysql.sock
      save the file
      sudo chmod 711 /var/mysql

      The reference article for this is: http://docs.info.apple.com/article.html?artnum=301457
      NOTE: the article tells you to chmod 754, I chose chmod 711 because it is more secure and still works.

      Problem 2: By default, the version of PHP and mySQL on Tiger server have an incompatability with authenication. You need to go into mysql and change the passwords to an older encryption style. Here’s how I did it (WARNING, you are editing the mysql user records directly, please be careful as you could lock yourself out):

      mysql -u root -p

      at the mysql prompt enter the following:
      use mysql;
      update user set password=old_password(”) where user=”;
      exit;
      Now, restart mysql and all should work!

      The reference article for this fix is: http://www.afp548.com/article.php?story=20051204002042215&query=php+mysql
      Look at the first comment to the article.

      Hope this helps!

    60. Trying to make RoundCube work on multiple imap accounts - ideally, at the same time. Is this possible, or if not, is it at least possible to make it work with the names of the servers not literal? Like:

      $rcmail_config['default_host'] = array(’ssl://blah.blah.org:993′,’ssl://blarg.blarg.com:993′);

      I don’t want my pulldown list to say blah.blah.org - what should I do?

    61. I get 403 errors when I try to send out a mail that’s long. Anyone else get this?

    62. I’ve never gotten that type of problem… it could be an htaccess thing or maybe you timed out when writing the email (default 10 minutes or so) and you needed to login?

    63. i’m having a problem.

      1. how do i use roundcube with other emails? i seem to be able to login only with my primary account.

      2. i can’t send any emails. it says message is sent successfully, but i never receive it.

    64. @Paul: No, I’m pretty sure I don’t go outside of this time limit. IIRC I set it to something around 20 minutes, and I only spent around 30 seconds typing out the email. Like I said, it only happens when the mail is very long (e.g. forwarding/replying), and if I delete the stuff that it tacks on, it works fine.

      I’ll try the RoundCube mailing list. And check my settings/htaccess.

      Thanks for the suggestions.

    65. Oh, and about your AJAX comment submission, it stays disabled even after I submit the comment and it appears. It’s just blank and disabled.

      I’m on FF 1.5, Windows XP.

    66. Great HOW-TO - got it up and going in no time - now to try customizing it sometime =) One thing I am trying to figure out is how to make it so you do not need to use username@domain.com to log in. Is there anyway that you can have it set to log in with just username? Thanks!

    67. Jon, to get only your name or pseudo, you just have to configure your imap server. If it is courier, just change the userb file in /etc/courier. To add a jon user, just do something like:
      userdb jon set mail=/var/mail/vhosts/domain.com/username home=/var/mail/vhosts uid=1008 gid=1008
      userdbpw -md5 | userdb jon set systempw
      Then type in your password, use makeuserdb to compile the file, and you are done :-)

    68. Ok, so I set this up on my own personal server. It’s just a dedicated server running Linux that the other admin owns.

      Can this just be setup on any run of the mill server? I’m getting the IMAP Error in (): Could not connect to localhost at port 143: Verbindungsaufbau abgelehnt thing.

      Any ideas?

    69. Nice HOWTO. How come you think Roundcube is better then Gmail?

    70. Thanks to RoundCubeMail How to, really helpfull, it’s a rock. Most of all, I finanlly got webmail with Mac touch :P. Btw is there any how I can customize login name so I just enter my acount name without domain name?

    71. I loaded up everything, but the server said:

      Internal Server Error
      The server encountered an internal error or misconfiguration and was unable to complete your request.

      Please contact the server administrator, support@100webspace.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

      More information about this error may be available in the server error log.

      Apache/1.3.33 Server at webmail.hostingrapid.com Port 80

      i don’t know where to modify the parts in this file db.inc

      HELP!~!!

    72. Have installed & had to delete the ‘.htaccess’ for all to work. I take it that those who have done the same have no problems with the prog?

      Only problem so far is that I have three boxes to login with

      name:
      pass:
      server:

      Any ideas how I can configure so that the server box disappears would be appreciated. Thanks.

    73. hi.
      i have a strange problem:
      installation : ok
      sending mails : ok
      recieving mails : ok

      but:

      reading / opening mails : NO (”opening” appears but nothing happens)
      moving mails to another folder : NO

      running on hmail-server on a w2003server machine w/ apache

      any ideas ?

      thx 4 your help !

    74. Hello Paul,

      Great tutorial on setting up roundcube. However, there seems to be a problem with the other languages. I used the latest cvs version of roundcube, which includes a greek translation. Now, there is this strange issue happening: it sometimes shows greek correctly and sometimes not! That happens for example when i switch folders, from inbox to sent, but not all greek are changed!!!! The message count bar (on top right) changes showing ??? but if refresh the page, in comes back to normal. Also, when i use greek on the subject line it is not displayed correctly at all, even when refreshing the page. However, when refreshed, the message body displays well if it contains Greek. This happens when sending or receiving mail written in greek.

      Could it be some problem with the database? Because the interface seems to show correctly in greek, while the “data” seem to have the encoding problem. I host my site on Bluehost and the default collation is latin1. I can export the table and import it back with changed “latin1″ to “utf” or “iso-8859-7″ (used for greek) but nothing seems to fix. Could you think of any solution?

      What about the encoding in the file main.inc.php:
      $rcmail_config['locale_string'] = ‘en’;

      I changed that too, but nothing seems to happen.

      Thanks in advance for your help!

      Fotis,

      Athens, Greece

    75. Hello Jock,
      I’ve got the same problem with my login screen. any news?

    76. Hello Chris,
      You’re right!

      Jed,
      What’s the way to login to my dreamhost email account by my email address instead of my mailbox number?

    77. Hi, thanks for the tutorial, really easy to follow - and I have a feeling I’m *almost* there!

      Installing on OS X 10.4.3, Apache, PHP, mySQL (installed mySQL using the tutorial on http://www.hivelogic.com) and I’m using Postfix Enabler with POP3 and IMAP enabled.

      Installation goes smoothly, but when I try to login it just hangs until eventually I get the error:

      Error sending request: ./?_auth=6dceae424579d6c947169b154236b9839af6e02d&_task=mail&_action=keep-alive&_t=1137466264838&_remote=1&_ts=1137466264838

      I have been having problems with permissions on my server, so I changed all permissions to 777 for testing purposes only, but the same thing happens.

      I tried to follow Larry Roth’s OS X specific instructions, but I don’t have the file /var/mysql - my mySQL install (I think!) is in /usr/local. Could this be my problem??

      Thanks for any help,

      phobic

    78. apologies - scratch this, I just started again using the tar.gz instead of the CVS and it worked - strange..

      great tutorial. :)

      phobic

    79. it’s a shame that roundcube mail does not support pop3… i would love to give this webmail to our customers

    80. Is there a way to have it autocheck for email once every 5 mins or so?

    81. I just installed the CVS version from December 16. It all seems pretty stable. The only thing is that all words are displayed in brackets. For example:

      Login is displayed as [login]

      address book is displayed as [addressbook]

      save is displayed as [save]

      Words are also joined together as in the address book example above.

      Anybody have any idea why this is happening and what I can do to fix it?

      Thanks

    82. I can’t log into Roundcube even after changing main.inc.php entries:
      // use this host for sending mails.
      // if left blank, the PHP mail() function is used
      $rcmail_config['smtp_server'] = ”;

      What is the bug?

    83. Nice instructions, it’s very slow when sending a message. Any ideas? All other folder access is quick.

    84. Hi. Is there any way of branding the RoundCube Webmail? I mean in addition of replacing the Roundcube logo with you own, how do you replace the Roundcube Mail with Yoursite Mail in the title of the browser?

    85. Great tutorial mate, up and going in no time

      @oka - a pop3 based webmail would be stupid because then you would have to have 2 lots of email data on your server, some for in the mail server, and others for downloaded by the webmail script, imap makes much more sense as then you can open the emails on an email client OR the webmail scipt from one data source

      @Nipun - you can edit the title, but it involves some script editing open the file

      program/include/rcube_shared.inc

      find the line

      // set default page title if (!strlen($this->title)) $this->title = ‘RoundCube|Mail’;

      and change it, mine for example is

      // set default page title if (!strlen($this->title)) $this->title = ‘BigBigHuge|Mail’;

    86. sorry, left some out, also change the following text in main.inc

      else if ($object==’pagetitle’)
      {
      $task = $GLOBALS['_task'];
      if ($task==’mail’ && isset($GLOBALS['MESSAGE']['subject']))
      return rep_specialchars_output(”RoundCube|Mail :: “.$GLOBALS['MESSAGE']['subject']);
      else if (isset($GLOBALS['PAGE_TITLE']))
      return rep_specialchars_output(”RoundCube|Mail :: “.$GLOBALS['PAGE_TITLE']);
      else if ($task==’mail’ && ($mbox_name = $IMAP->get_mailbox_name()))
      return “RoundCube|Mail :: “.rep_specialchars_output(UTF7DecodeString($mbox_name), ‘html’, ‘all’);
      else
      return “RoundCube|Mail :: $task”;
      }

      for example this is mine

      else if ($object==’pagetitle’)
      {
      $task = $GLOBALS['_task'];
      if ($task==’mail’ && isset($GLOBALS['MESSAGE']['subject']))
      return rep_specialchars_output(”BigBigHuge|Mail :: “.$GLOBALS['MESSAGE']['subject']);
      else if (isset($GLOBALS['PAGE_TITLE']))
      return rep_specialchars_output(”BigBigHuge|Mail :: “.$GLOBALS['PAGE_TITLE']);
      else if ($task==’mail’ && ($mbox_name = $IMAP->get_mailbox_name()))
      return “BigBighuge|Mail :: “.rep_specialchars_output(UTF7DecodeString($mbox_name), ‘html’, ‘all’);
      else
      return “BigBigHuge|Mail :: $task”;
      }

    87. Thanks David for your help. I finally succeded in customizing my installation of Roundcube wemail. Kudos to the developer for such a fine product.

    88. does anyone else have issues with viewing attachments? my inbox has the little attachment icon when there are attachments, but when you go into the email, there is no mention of how to download them or any mention of them what so ever or anything handy like that.

      anyhelp would be appreciated

    89. Paul, I really enjoyed your tutorial. I ran into a few issues using CPanel so I decided to write my own tutorial. Additionally I used some of my theme building experience and skinned roundcube with the iCandy Jr. icons. I think it gives RoundCube an even fresher look. I wrote a how to on my blog for anyone who would like to try a different look for RoundCube.

      Installing the iCandy Jr. theme on RoundCube

      I even have a screenshot up if you wanna check it out. Again thanks for writing your tutorial, its what inspired me to try RoundCube in the first place!

    90. Great stuff Jason, your theming is excellent.

    91. I am using roundcubemail-0.1-20051021 and I have gone through and David suggested to change the title but I still have the RoundCube|Mail title.

      Does anyone have any suggestions?

      Thanks

    92. get a program like dreamweaver or something that can find text inside documents in a directory and make it search for “RoundCube|Mail”

      you will probably find a few side notes but look for somewhere where it says it in the middle of the code, replace it with your desired title, and give it a go, if it doesn’t work, change it back and try again :-)

    93. very nice indeed, shall be adding this to my website shortly, it looks pretty nice and easy to use/mod.

    94. I’d install another webmail client along side of this one, this one is too buggy and feature lacking just yet, but its a good start, a VERY good start

    95. RE: Title Change?

      Thanks David, I actually had no idea that Dreamweaver could search for text in documents that are in a directory.

      Got it going now :)

      And RE: the attachments, they appear under the recieved date for me. One click and they download.

      Jeff

      Jeffrey Robinson on Feb 1st, 2006 at 10:37 pm
    96. Yeah, the attachments, they dont show up at all for me, and sometimes the whole directory doesn’t show, it just kid of ends the page at the title, doesn’t even say its empty. I’m running a windows XP box with apache2, MySQL and php5, and I’m using hmailserver for the mail server, maybe its something in my configuration, squirellmail didn’t work very well with hmailserver either, if you guys are after something nicer than squirelmail but same functionality, check out ilohamail, I’m really enjoying it and its alot easyer to customise with images and such.

    97. Paul,

      Thanks for the kind words and support. Just thought I would share that I have updated my blog to include yet another theme. This time it’s a custom made theme that I did from scratch. All those roundcube users out there who are lookin for something a little different are free to check it out.

      Introducing the blackeye theme for RoundCube

      -Jason

    98. Hi Paul….
      Thank you for the tutorial, I’m *almost* there!
      Im runnig a windows server, Apache, Mysql & Mercury (mailserver)
      but…

      I have a few problems, when i go to http://localhost/mail/
      I have three boxes to login with

      name:
      pass:
      server:

      when I try log in, i get this message back:
      ————————————————-

      IMAP Error in (): Could not connect to localhost at port 143: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
      ————————————————

      Any ideas how I can configure this?

      Thanks.

    99. RoundCube Rocks!! Beats the heck out of Squirrel!

      I’m having one problem, not so much with the installation, but with the end user. I am trying to make webmail available to several friends on a very locked down network. They can get to the site, but they can not logon. In the little bit of testing I can do with them, it appears that their browser has the cookies locked out (which RoundCube uses for its sessions). My site is on a shared host server, so I can not change the server defaults (sessions use cookies is on).

      SO, is there a way to make RoundCube use non cookie sessions?

      Thanks
      James

    100. Thanks for the excellent tuturiol! Bummer my installation did not go without a hitch.

      I am using a remote shared server (MidPhase) and have uploaded all the altered files and I have created my rcube MySQL database. When going to my site oxjox.com/mail/ I get the following error:

      DB Error in /home/oxjosba9/public_html/mail/program/include/rcube_db.inc (97): DB Error: connect failed

      Fatal error: Call to undefined function: query() in /home/oxjosba9/public_html/mail/program/include/rcube_db.inc on line 213

      Please help :-)

    101. All that I can think of at this stage is that your settings are not correct in your Database config (db.inc.php) line 21 (or abouts) should read:
      mysql://sql_username:sql_password@localhost/sql_database

      Hope it helps

      Jeff

      Jeffrey Robinson on Feb 8th, 2006 at 6:13 pm
    102. Jeff - that’s all I could think of too. I have literally been starring at my screen for hours today trying to figure out why it’s not working. I’ve tried with and without the mysql prefix - but no help either way

    103. I have installed the version on the RoundCube site rather than the CVS on sourceforge and now get a similar error that others were getting where lines 63 and 124 are giving me the errors.

    104. I am getting this error after installing

      DB Error ……program/include/rcube_db.inc (63): DB Error: insufficient permissions

      Fatal error: Call to undefined function: query() …..program/include/rcube_db.inc on line 124

      Any ideas?

    105. This looks nice, and I’d be happy to move away from Gmail, but SEARCH is awesome and I don’t think I can live without it.

      How hard would that be to add?

    106. Hi

      Great tutorial, but I think I may have made a boo boo (no pun intended) somewhere.

      I am receiving mail at least my mail server is.

      However in Roundcube I get the usual TO: FROM: Subject: but the body of my mail is missing!

      Anyone else had this?

      Regards

      Yogiman!

    107. Paul, this is great stuff. I noticed that when I go to forward an HTML-formatted message, it turns it into text. Any ideas if this is a bug, or it’s just a feature that’s not implemented yet?

    108. I´m looking to achieve the same as other users (Jon and Yoki):
      Is there a way I can modify the login name settings so the user can just enter the account name without @domain?
      Anyone?

    109. This was a really great guide. I especially like how you went through some easy css and image changes.

    110. In reference to Abhi and Chris’s problems
      abhi’s comment
      Chris’ Solution

      I have the exact same problem shown in my logs
      Invalid command ‘php_flag’, perhaps mis-spelled or defined by a module not included in the server configuration

      Yet the solution Chris suggested didn’t work, i’ve also tried deleting the .htaccess file, that doesn’t work, and also leaving a .htaccess file there but blank.. i’ve tried multiple things but I can’t get it to work :x
      I’ve had it working on a previous server, and i know the reason it won’t work on this server is because mod_php isn’t compiled in with apache, I’m just wondering if anyone has come across an alternative work around that works or can suggest an alternative work around for me to try.

      Thanks in advance,
      chrissy

    111. In reference to Abhi and Chris’s problems

      I have the exact same problem shown in my logs
      Invalid command ‘php_flag’, perhaps mis-spelled or defined by a module not included in the server configuration

      Yet the solution Chris suggested didn’t work, i’ve also tried deleting the .htaccess file, that doesn’t work, and also leaving a .htaccess file there but blank.. i’ve tried multiple things but I can’t get it to work :x
      I’ve had it working on a previous server, and i know the reason it won’t work on this server is because mod_php isn’t compiled in with apache, I’m just wondering if anyone has come across an alternative work around that works or can suggest an alternative work around for me to try.

      Thanks in advance,
      chrissy

    112. How could I configure RoundCube to function like Outlook? So I could use it to retrieve Yahoo mail and send email?

    113. Thanks for writing this great article, helped me with the install. Appreciate it.

    114. I keep getting:

      [05-Mar-2006 17:00:16 -0500] IMAP Error: Could not connect to localhost at port 143: Connection refused in on line 0

    115. 1&1 users please beware that you need to set: