Setup Roundcube on FreeBSD
Paul Stamatiou wrote a HOW TO setup RoundCube webmail on your server. I decided to write the same HOWTO on setting up Roundcube on FreeBSD. RoundCube is a PHP/MySQL based webmail system with AJAX.
The Roundcube webmail software is available in FreeBSD ports. If you want to learn more about FreeBSD packages and ports, please read The FreeBSD Handbook, chapter 4.
The ports for Roundcube webmail is available in /usr/ports/mail/roundcube. To install roundcube, you will need to type the following (as root):
# cd /usr/ports/mail/roundcube # make install clean
The ports system will install Apache, PHP4, and MySQL if you do not have them on your system. By default, roundcube is installed in /usr/local/www/roundcube/
Now, I’m going to map the http://localhost/roundcube/ to /usr/local/www/roundcube/. To do this you will need to open the apache configuration located in /usr/local/etc/apache or /usr/local/etc/apache2 (if you have apache2). Edit httpd.conf then copy and paste the following:
Alias /roundcube "/usr/local/www/roundcube/"
<Directory "/usr/local/www/roundcube">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Save the file and then restart apache: # apachectl restart
You now need to create a database for roundcube. Once you’ve created the database, you need to open config/db.inc and change the database setting:
$rcmailconfig['dbdsnw'] = 'mysql://username:secretpass@localhost/roundcube';
The format for the above line is db_provider://user:password@host/database.
Now, you want to edit main.inc.php file and change the mailhost setting with your IMAP server address. You can leave them blank, roundcube will display a textbox at login so users can enter the IMAP address manually.
$rcmailconfig['defaulthost'] = 'localhost';
Now, you need to import the database structure into your roundcube database. You can copy and paste them into phpMyAdmin or you can use the following command:
# cd /usr/local/www/roundcube/SQL # mysql -u user -p database < mysql.initial.sql
All done, congratulation you have installed roundcube on your server. You can access your roundcube webmail on http://localhost/roundcube/ (You can change your localhost to your hostname).
You can now login with your username and password on your IMAP server.
1. Ronny 1 Nov 2005
Roundcube seems promising. I just installed it and using it right now. Few things need to be implemented, at least for me, mail threading, sorting, and I noticed that the user IP address is not recorded in the headers.
Good find!
2. Paul Stamatiou 1 Nov 2005
Nice article ‘port’ ;-) I’ll be linking to it on my RoundCube article!
3. William Pramana 1 Nov 2005
Ronny: I wish they would implement drag-and-drop feature. So, we can just move our mail from one folder to another like the new Yahoo! Mail.
Paul: Thanks, your article inspired me :-)
4. Renwick 10 Nov 2005
I didn’t know that it was available via ports it is very different from the CVS release (which i installed)
5. William Pramana 10 Nov 2005
Renwick: I think the one in ports is an older version. Roundcube’s development is very active.You should be able to change the Makefile to install the latest version. Then you can submit the changes to the ports maintainer.
6. Liz 19 Jan 2006
You can drag and drop email in the latest version. I just wish It did threading.
7. lovecreatesbeauty 27 Apr 2006
Hello William,
It seems that I do not set up roundcube on Windows 2000 machine. I download roundcubemail-0.1beta.tar.gz and get a bundle of files after decompress it. There is not one executable setup program and/or MAKEFILE.
—- quoting —- . .. 198 .htaccess 5,392 CHANGELOG config 11,111 index.php 3,027 INSTALL 15,129 LICENSE logs program 2,414 README skins SQL temp
4,436 UPGRADING7 File(s) 41,707 bytes 8 Dir(s) 14,756,384,768 bytes free —- quoting ends —-
I have apache and php installed alreay on the Windows machine. Even I install hMailServer + SquirrelMail and the squirrel webmail works fine, but roundcube can not work.
Also I follow the INSTALL file and make changes to mysql database properly. Following your suggestion here I make changes:
“Alias /roundcube …”
$rcmailconfig[‘dbdsnw’] = ‘mysql://roundcube:pass@localhost/roundcubemail’;
$rcmailconfig[‘defaulthost’] = ‘localhost’;
After I restart apacheBut, I still can not request this page: http://localhost/roundcube/ , What was I missing? Why there is not a executable installer in the package? Is there anything wrong with the package I downloaded?
— Sincerely, lovecreatesbeauty
8. Ciscocertifiedgeek 15 Aug 2006
@lovecreatesbeauty:
There is no way you can use roundcube the way you think it was. It is not intended for Windows platform. At least not without modification, though.
Please read this article’s title. FreeBSD is a operating system. Works like Windows but way different than Windows.
9. repliertoGeed 30 Jul 2007
Just gotta say Cisco… If I could pick two further parts of the OS universe than the ‘w’ thing and FreeBSD I’d try. I guess they can run on the same hardware.