Forums

×

Warning

JUser: :_load: Unable to load user with ID: 96007
Resolved
1 votes
This is a HowTo get Roundcube Webmail client up and running in ClearOS 6.3. Roundcube itself is just an e-mail client like Outlook Express or Thunderbird and can easily be configured to read your IMAP mail held anywhere in your network from the web.

For this set up I will assume you have installed the Web Server and MySQL. PHPMyAdmin could be useful if you want to avoid a couple of the steps at the command line.

My main sources of information are the Roundcube Wiki and the INSTALL file in the tarball.

Instructions:

Download the latest stable version from here. I have not found a direct link that you can use with wget. Upload it into a folder on your server with something like WinSCP.

In a terminal, navigate to the folder where you downloaded the tarball then:
yum --enablerepo=clearos-epel install php-mcrypt php-pear-DB php-pear-MDB2-Driver-mysql php-pear-Mail-mimeDecode php-pear-Net-IDNA2 
tar xfz roundcubemail-0.8.1.tar.gz
mv roundcubemail-0.8.1 /var/www/html/roundcube
chown apache:apache /var/www/html/roundcube -R

This untars the file and moves the contents into a folder called roundcube in the web server. You can call the folder what you want but amend the instructions accordingly and remember to change the url you use to access Roundcube. It then changes ownership of the files and folders to apache.

There is an irritating feature of Roundcube. It does not like you using the system setting of timezone and it prefers you to use the php setting. This is not set by default. If you do not set the timezone in php your logs will see 9 messages every minute (per logged in user?). This is a PITA. I have seen two similar ways round it.

1 - in /etc/php.ini look for a line ";date.timezone =". Uncomment it and add your timezone. Valid timeszone names can be found here.
2 - put a line date.timezone = your_timesone into /var/www/html/roundcube/.htaccess

From what I understand 1 changes the setting globally in the Webserver, 2 changes it for Roundcube only. I did 2.

Next you want to enable .htaccess overrides. In /etc/httpd/conf/httpd.conf, change:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
to

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All

Then restart the webserver:
service httpd restart

Next you need to set up the database in MySQL. This can be done through the webconfig if you have PHPMyAdmin installed or through the command line. The command line instructions are:
mysql -uroot -pyour_mysql_password -e"CREATE DATABASE roundcubemail;"
mysql -uroot -pyour_mysql_password -e"GRANT ALL PRIVILEGES ON roundcubemail.* TO your_roundcube_user@localhost IDENTIFIED BY 'roundcube_password';"
mysql -uroot -pyour_mysql_password roundcubemail < /var/www/html/roundcube/SQL/mysql.initial.sql

Change your_roundcube_user to whatever user ID you would like Roundcube to use. Change roundcube_password to whatever you want. You will need these later in the installation.

Alternatively you could use Webconfig > Database > MySQL Server > “Go to MySQL Management Tool” and do the MySQL set up from there.

Once you have done this, in a browser , navigate to http://your_server_ip/roundcube/installer" target="_blank">http://your_server_ip/roundcube/installer" target="_blank"> http://your_server_ip/roundcube/installer" target="_blank">http://your_server_ip/roundcube/installer
In 1 Environment Check:
Make sure all items except Intl:, PostgreSQL: and SQLite (v2): are green then hit "Next"
In 2 Create Config I left most things as default. Options changed were:
General configuration
- Disable spellchecker. The spell checker is contentious as it sends everything to Google (Googiespell). The choice is yours.
Logging & Debugging
- Log driver to “syslog”. Otherwise the logs go to /var/www/html/roundcube/logs/ and you will have to configure logrotate to rotate them or they will grow forever.
Database setup
Database user name = your_roundcube_user from earlier
Database password = roundcube_password from earlier
IMAP Settings
default_host = localhost (It does not have to be. It is the location of your imap server. If this is on a server behind ClearOS then point it to that)
SMTP Settings
smtp_server = localhost (You must use this if you use your smtp server as a relay. If not, you could leave it blank)
Display settings & user prefs
preview_pane = checked (because I like it!)
htmleditor = checked (ditto)

Change other prefs as you want then click on Create Config. Then follow the instructions in the green box. I think the best thing to do is to download the two files by clicking on the download links then upload them to /var/www/html/roundcube/config

These two files probably should have apache as the owner and the webserver needs restarting again:
chown apache:apache /var/www/html/roundcube –R
service httpd restart

Then Click on Continue in the installer. In 3 Test Config I get one error because I did configure the support_url. This is deliberate as it means anyone who bumps into your web site will get a link or e-mail address to where ever you chose. I prefer not to have this. You can now send a test e-mail and do a test log in.

Open your firewall to http and/or https. Roundcube can now be accessed from your browser on http://your_server_ip/roundcube/" target="_blank"> http://your_server_ip/roundcube/ or https://your_server_ip/roundcube/" target="_blank"> https://your_server_ip/roundcube/

Two further things. The docs say that if you add users you should “flush privileges” before they can log on. I don’t like this, but if you often add users, you can create a cron.daily job/file with the following line in it:
mysql -uroot -pyour_mysql_password -e'FLUSH PRIVILEGES;'


Also recommended in the docs is a routine database cleanup. Create a file in cron.monthly and in it put
/var/www/html/roundcube/bin/cleandb.sh
Remember to make both cron jobs executable.

Enjoy! ;)

[edit]
I have now added instructions to install from an rpm here, further down the thread. The advantage of the rpm is that it keeps your files away from your webserver root; it uses a better set up for logging; it is possibly a bit simpler to do. The disadvantages are that the files are not all in one place and you lose the installer so have to configure two files by hand.
When I come to installing on my production box (rather than my test VM), I will probably use the rpm method and tweak it so I can use roundcube rather than roundcubemail in the URL.
[/edit]
Saturday, September 22 2012, 08:23 PM
Share this post:
Responses (35)
  • Accepted Answer

    Sunday, September 23 2012, 02:05 AM - #Permalink
    Resolved
    0 votes
    Thanks Nick - that provides a choice of three for free now...

    Any particular reason for not using the roundcubemail rpm in EPEL for Redhat/CentOS Version 6 (el6) ?
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 23 2012, 07:54 AM - #Permalink
    Resolved
    0 votes
    I tried the EPEL rpm but I could not find the latest version (0.8.1), only 0.7.3. Also when I installed it I could not work out what to do with it. I examined the rpm and it puts its files all over the place - a lot under /usr/share, some in /etc and so on, but nothing in the webserver. I also could not work out what it was doing with MySQL. I am still a bit of a Linux luddite and I know very little about webservers so rather than continue I went back to source. Now I've done that I probably understand how the rpm is structured and working would have a chance of getting it going - but it is still the older version.

    [edit]
    I've had another look at the rpm. The /installer directory is not there so you would have to do a manual configuration of /config files. The sample databases are under docs so the MySQL configuration needs to be altered and there is no post-installation script to do it for you. The INSTALL doc has not been changed to reflect the amended file structure or lack of installer.
    [/edit]
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 23 2012, 10:48 PM - #Permalink
    Resolved
    0 votes
    Nick - yes a later version makes sense - more features and/or bug fixes provided the pre-requisites are not at a higher level than that already installed...

    As for /usr/share - this is quite normal and the default for many such programs.

    If you have a ClearOS 5.2 installation with horde you will see horde is installed at /usr/share/horde.
    Hastymail2 defaulted to /usr/share/hastymail2... For hastymail2 to work with these locations...

    On 6.3 only this was necessary... using the standard webserver

    [root@alice ~]# cat /etc/httpd/conf.d/hastymail2.conf
    # This is the apache configuration file for hastymail2.
    #
    Alias /hastymail2 /usr/share/hastymail2
    [root@alice ~]# cat /etc/clearos-release
    ClearOS Community release 6.3.0 (Final)
    [root@alice ~]#

    On Version 5.2 it was a little more involved as it had to co-exist with horde - so I simply mimic the horde configuration, choosing a different port.... (I have horde on the alternate port 443) and use webconfig's web server.

    [root@danda ~]# cat /usr/webconfig/conf/httpd.d/hastymail2.conf
    Listen 8443

    <VirtualHost _default_:8443>
    SSLEngine on
    SSLCertificateFile /usr/webconfig/conf/server.crt
    SSLCertificateKeyFile /usr/webconfig/conf/server.key
    SSLCipherSuite HIGH:MEDIUM:!aNULL:!SSLv2:+SHA1:+MD5:+HIGH:+MEDIUM
    DocumentRoot "/usr/share/hastymail2"
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    RewriteRule !^/hastymail2 /hastymail2 [PT]
    Alias /hastymail2 /usr/share/hastymail2
    </VirtualHost>
    [root@danda ~]# cat /etc/clearos-release
    ClearOS release 5.2
    [root@danda ~]#

    The reply is currently minimized Show
  • Accepted Answer

    Monday, September 24 2012, 11:25 AM - #Permalink
    Resolved
    0 votes
    Now I've understood the installation of the vanilla Roundcube I can see what the rpm is doing and I understand it. I just could not work it out at the time from the installation instructions on the Roundcube site. The missing installer is a pity as is the lack of updated documentation for the revised layout. If a 0.8.1 rpm becomes available, I'll happily update my HowTo to allow both methods.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2012, 11:26 AM - #Permalink
    Resolved
    0 votes
    Because this is web server code I am trying out the Fedora Rawhide 0.8.1 rpm to see if I can add it to the HowTo. I like what they have done with the logs to /var/log/roundcubemail/ then adding the logrotate elements to the package.

    One thing I don't understand is that I could not access the webserver with the rpm as supplied. I have possibly traced it back to a file in the rpm and not in the tarball - /etc/httpd/conf.d/roundcubemail.conf. It looks like:
    #
    # Round Cube Webmail is a browser-based multilingual IMAP client
    #

    Alias /roundcubemail /usr/share/roundcubemail

    <Directory /usr/share/roundcubemail/>
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    </Directory>
    Is this restricting logins to localhost? I can access the webserver if I remove everything between the Directory tags. Is this (or changing 127.0.0.1 to all) the correct or safe way of solving the login problem?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2012, 11:46 AM - #Permalink
    Resolved
    0 votes
    Hi Nick, thanks for hthe howto. Yes the virtualhost config appears restricted to localhost connections only...seems a bit conservative to me! I use something similar for the backuppc app to restrict access to local subnets

    allow from 1.2.3.4 #remote ip
    allow from 192.168.0.0/16
    allow from 10.0.0.0/8
    allow from 172.16.0.0/12
    allow from 127.0.0.1

    If you want to permit all access then use something like Zarafa Webaccess
    Alias /webaccess /usr/share/zarafa-webaccess

    <Directory /usr/share/zarafa-webaccess/>
    DirectoryIndex index.php
    Options -Indexes +FollowSymLinks
    AllowOverride Options

    Order allow,deny
    Allow from all
    </Directory>

    As you had discovered the el5 or Fedora 'way' is to drop web apps into /usr/share/appname and then create an alias for httpd which points to the subdirectory. Zarafa uses the same... it saves polluting the webroot with folders and the aliases can be managed seperately with their own specific configuration
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2012, 12:02 PM - #Permalink
    Resolved
    0 votes
    Thanks, Tim. I'll give that a go.

    To save me experimenting, would everything under /usr/share/roundcubemail need apache:apache ownership? Ditto for the log directory /var/log/roundcubemail/?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2012, 12:35 PM - #Permalink
    Resolved
    0 votes
    No not necessarily, usually files are readable by anyone (644) including apache and created with root:root ownership, it's only specific directories and files that apache needs to write too

    For example Zarafa webaccess stores all its session and temporary data in another directory /var/lib/zarafa-webacess/...in which apache has full read/write permissions. This is also true for BackupPC. This helps for upgrades because the /usr/share/appname subdirectory is essentially the read only contents, and can be updated via RPM and the states and user content managed in another directory

    The approach varies of course between apps, some also tend to dump everything in /opt/appname but that's quite rare.

    EDIT: Regarding logs, if the syslog daemon is doing the logging, then its usually root ownership. If its apache service (in /var/log/httpd/xxx_access_log) then usually the file is owned by apache.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 29 2012, 06:56 PM - #Permalink
    Resolved
    0 votes
    These are alternative instructions to install using an rpm. It is a Fedora package, but in this case it does not matter. The rpm is packaged somewhat differently to the tarball with files going in different locations. It has also been set up to put its logs into /var/log/roundcube (which is good) but they have only done half the job to rotate the logs which we’ll have to correct. The URL you use need to use to access it is also slightly different (but can be modified). The downside of the rpm based installation is that you lose the installer wizard so you’ll have to configure the db.inc.php and main.inc.php files by hand.

    For this set up I will also assume you have installed the Web Server and MySQL. PHPMyAdmin could be useful if you want to avoid a couple of the steps at the command line.

    My main sources of information are the Roundcube Wiki and the INSTALL file in the rpm.

    Instructions:

    In a terminal do the following:
    yum --enablerepo=clearos-epel install php-mcrypt php-pear-DB php-pear-MDB2-Driver-mysql php-pear-Mail-mimeDecode php-pear-Net-IDNA2 
    rpm –ivh http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/i386/os/Packages/r/roundcubemail-0.8.1-2.fc19.noarch.rpm
    chmod 755 /usr/share/roundcubemail/bin/*

    There is still the irritating feature of Roundcube where it thinks you are more capable of setting the timezone in apache correctly than you are of the system default and it complains bitterly in the logs until you set it in the webserver. So, in /etc/php.ini, look for a line ";date.timezone =". Uncomment it and add your timezone. Valid timeszone names can be found here.

    The default installation only allows you access to Roundcube from the server – not much use as a webmail solution, so we’ll change it to allow access from anywhere. Copy and paste the following into /etc/httpd/conf.d/roundcubemail.conf replacing the original text (thanks, Tim):
    #
    # Round Cube Webmail is a browser-based multilingual IMAP client
    #

    Alias /roundcubemail /usr/share/roundcubemail

    <Directory /usr/share/roundcubemail/>
    DirectoryIndex index.php
    Options -Indexes +FollowSymLinks
    AllowOverride Options

    Order allow,deny
    Allow from all
    </Directory>

    Next you need to set up the database in MySQL. This can be done through the webconfig if you have PHPMyAdmin installed or through the command line. The command line instructions are:
    mysql -uroot -pyour_mysql_password -e"CREATE DATABASE roundcubemail;"
    mysql -uroot -pyour_mysql_password -e"GRANT ALL PRIVILEGES ON roundcubemail.* TO your_roundcube_user@localhost IDENTIFIED BY 'roundcube_password';"
    mysql -uroot -pyour_mysql_password roundcubemail < /usr/share/doc/roundcubemail-0.8.1/SQL/mysql.initial.sql

    Change your_roundcube_user to whatever user ID you would like Roundcube to use – I used roundcube. Change roundcube_password to whatever you want. You will need these later in the installation.

    Alternatively you could use Webconfig > Database > MySQL Server > “Go to MySQL Management Tool” and do the MySQL set up from there.

    Now to configure /etc/roundcubemail/db.inc.php. Change the line:
    $rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
    to
    $rcmail_config['db_dsnw'] = 'mysql://your_roundcube_user:roundcube_password@localhost/roundcubemail';


    In /etc/roundcubemail/main.inc.php you need to change the following:
    default_host = localhost (or it can point to an IMAP server behind ClearOS. If left empty you will be asked for an IMAP server at login)
    smtp_server = localhost if you are using your smtp server as a relay (or it can point to a valid SMTP server anywhere but you may need to setup authentication in this file). It can be left empty otherwise.

    Optionally there are other parameters you can change and the files contain reasonable descriptions of the parameters. I have changed enable_spellcheck to false, preview_pane to true and htmleditor to 1.

    The webserver now needs restarting:
    service httpd restart


    Open your firewall to http and/or https. Roundcube can now be accessed from your browser on http://your_server_ip/roundcubemail/ or https://your_server_ip/roundcubemail/. If you want to access it using any other path change the alias in /etc/httpd/conf.d/roundcubemail.conf

    At some point you need to fix their logrotate function to rotate both the logs instead of only one. Change /etc/logrotate.d/roundcubemail to:
    /var/log/roundcubemail/errors {
    missingok
    notifempty
    size 30k
    create 0660 apache apache
    }
    /var/log/roundcubemail/sendmail {
    missingok
    notifempty
    size 30k
    create 0660 apache apache
    }

    As before, two further things. The docs say that if you add users you should “flush privileges” before they can log on. I don’t like this, but if you often add users, you can create a cron.daily job/file with the following line in it:
    mysql -uroot -pyour_mysql_password -e'FLUSH PRIVILEGES;'

    Also recommended in the docs is a routine database cleanup. Create a file in cron.monthly and in it put

    /usr/share/roundcubemail/bin/cleandb.sh
    Remember to make both cron jobs executable.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 29 2012, 11:45 PM - #Permalink
    Resolved
    0 votes
    Thanks Nick - Roundcube installed and running - now have Squirrelmail, Hastymail2 and Roundcube all on the same machine - so now I can decide which to keep :-)

    Some comments...

    1. I used wget and then local install for the rpm as I like to keep a copy

    2. Creating the user from the command line created the user - but gave a database error after the install was complete when logging in via the browser and content in /var/log/roundcubemail/errors. Deleting the roundcube user with PHPMyAdmin, then creating a new one with access to the roundcubemail tables (created earlier via the command line) worked...

    3. I found my "/usr/share/roundcubemail/bin/cleandb.sh" was not executable and had to fix that...

    Thanks for all your hard work putting this together... will add more comments if they arise...

    EDIT - the above was on my ClearOS Version 6.3 64-bit production server
    An install on a ClearOS Version 6.3 32-bit test server was equally successful
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 30 2012, 12:59 PM - #Permalink
    Resolved
    0 votes
    Hi Tony,

    1 - That is probably what I'd do as well as I like to keep the original rpm. I was just simplifying the instructions. If anyone wants to keep a copy of the rpm, instead of the "rpm -ivh http......" line, do:
    wget http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/i386/os/Packages/r/roundcubemail-0.8.1-2.fc19.noarch.rpm
    yum localinstall --nogpgcheck roundcubemail-0.8.1-2.fc19.noarch.rpm


    2 - There is a minor error in my instructions in the line to create the user - a space between the password and closing single quote - which I am removing from the instructions. I have not tried with the space, but without it I do not see the error you are seeing so I'm not sure. The first two MySQL commands could be broken down into logging on to MySQL, issuing the commands and quitting as follows:
    mysql -uroot -pyour_mysql_password
    CREATE DATABASE roundcubemail;
    GRANT ALL PRIVILEGES ON roundcubemail.* TO your_roundcube_user@localhost IDENTIFIED BY 'roundcube_password';
    \q
    The third command needs to be issued as is or I need to work out how to select a database within MySQL. This still does not give me the error you are seeing :(

    3 - I did not notice that. I just changed the path to the file in the new installation. I'll fix my instructions for the whole /usr/share/roundcubemail/bin/ folder to mirror the permissions in the tarball.

    I must say I am a little disappointed with the rpm, because of the issues mentioned. On the other hand it is free so I am not in a position to complain.
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, January 18 2013, 10:39 AM - #Permalink
    Resolved
    0 votes
    I installed Roundcube on my 6.3 server, I followed your instructions, but changed it to ssl, but when I try to log in I just get login failed. I used ssl://localhost for the imap and smtp server info
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, January 18 2013, 10:42 AM - #Permalink
    Resolved
    0 votes
    ok, I changed it to regular instead of ssl, and now it says connection to storage server failed?
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, January 18 2013, 10:56 AM - #Permalink
    Resolved
    0 votes
    from the research ive done it is an issue with the imap and smtp settings, ive tried:

    $rcmail_config['default_host'] = 'default_host = localhost';
    and
    $rcmail_config['default_host'] = 'localhost';

    for the imap

    and
    $rcmail_config['smtp_server'] = 'smtp_server = localhost';

    and
    $rcmail_config['smtp_server'] = 'localhost';
    for the smtp server
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 18 2013, 11:29 AM - #Permalink
    Resolved
    0 votes
    I use the form:
    $rcmail_config['default_host'] = 'localhost';
    $rcmail_config['smtp_server'] = 'localhost';

    It works for me. How have you set up your Webconfig > Server > IMAP and POP Server > Settings? I only have IMAP enabled.
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, January 18 2013, 11:33 AM - #Permalink
    Resolved
    0 votes
    thats what I have them set to? could it be a .htaccess issue, or could it be only allowing connections to localhost?
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, January 18 2013, 11:43 AM - #Permalink
    Resolved
    0 votes
    ive even tried plugging in my domain name.

    as far as server goes, ive tried it with with imaps enabled and disabled, while keeping imap enabled, enableing or disabling pop/pops is irrelavant as roundcube uses imap
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, January 18 2013, 12:04 PM - #Permalink
    Resolved
    0 votes
    I got it going, just had to restart cyrus-imapd service
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, January 18 2013, 12:16 PM - #Permalink
    Resolved
    0 votes
    now I have a new problem, when I send an email from roundcube it sends as "myuser@localhost.mydomain.com"

    how do I get rid of the localhost part
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 18 2013, 12:20 PM - #Permalink
    Resolved
    0 votes
    I think you set up that bit in the Roundcube GUI. My knowledge of detailed mail set up is a bit flakey. I know I set mine up in the Webmail interface and it works - but it is onerous to do it for a big organisation. I suspect there is another way.
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Friday, January 18 2013, 12:24 PM - #Permalink
    Resolved
    0 votes
    I got it, it was under settings -> identities
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 04 2013, 12:43 AM - #Permalink
    Resolved
    0 votes
    I'm trying to install RoundCube 0.8.6 using the first method (manual).
    At the first step of the installer, check environment, I have some issues.
    It says:

    DOM: NOT OK(See http://www.php.net/manual/en/book.dom.php)
    Intl: NOT AVAILABLE(See http://www.php.net/manual/en/book.intl.php)

    I did a phpinfo() and indeed I could not find part where it shows "DOM/XML".
    How can I get a version of php with dom enabled?

    Thank you

    [EDIT] I found Tim's repos that have php 5.4.7 and it has DOM/XML enabled!
    http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,17/func,view/id,46434/
    The reply is currently minimized Show
  • Accepted Answer

    Andi  Riza
    Andi Riza
    Offline
    Sunday, August 25 2013, 03:43 AM - #Permalink
    Resolved
    0 votes
    Is there any chance to include these apps into the marketplace?
    :)
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 09 2013, 07:13 PM - #Permalink
    Resolved
    0 votes
    Thanks Nick for this oldie but a goodie tutorial. I've just installed roundcubemail-0.9.5 with

    yum --enablerepo=clearos-epel install roundcubemail


    and included all of the dependencies (mostly php stuff) included with the install.

    It created the /usr/share/roundcubemail, /usr/share/doc/roundcubemail-0.9.5 and /etc/roundcubemail directories.

    I created the roundcubemail database using phpMyAdmin (accessible through the Webconfig) and gave my mysql user the appropriate privileges. Since there were no installer or SQL folders created with this rpm under /usr/share/roundcubemail, I stuck to just creating a SQL folder. I copied the mysql.initial.sql file provided in /usr/share/doc/roundcubemail-0.9.5/SQL into the /usr/share/roundcubemail/SQL folder I created and ran

    mysql -uroot -pyour_mysql_password roundcubemail < /usr/share/roundcubemail/SQL/mysql.initial.sql


    to which it created all of the database tables. I then created a symbolic link to /usr/share/roundcubemail using

    cd /var/www/html
    ln -s /usr/share/roundcubemail webmail


    and gave apache ownership of the roundcube root directory

    chown -R apache:apache /usr/share/roundcubemail


    From there it was playing with the config files in /etc/roundcubemail, starting with db.include.php where I had to enter my database user credentials

    $rcmail_config['db_dsnw'] = 'mysql://user:password@localhost/roundcubemail';


    Then onto /etc/roundcubemail/main.include.php, changing the following settings

    $rcmail_config['default_host'] = '%t';
    $rcmail_config['smtp_server'] = '%t';
    $rcmail_config['smtp_user'] = '%u';
    $rcmail_config['smtp_pass'] = '%p';
    $rcmail_config['mail_domain'] = '%t';
    $rcmail_config['plugins'] = array('help', 'newmail_notifier', 'additional_message_headers');
    $rcmail_config['htmleditor'] = 1;
    $rcmail_config['preview_pane'] = true;


    %t tells the config to go with your domain.com, which is nice because it shows user@domain.com when logged in.
    %u tells the config to use the user logged into the roundcubemail session for smtp send credentials.
    %p tells the config to use the user's password who is currently logged into the session for smtp send credentials.
    There are a list of plugins in /usr/share/roundcubemail/plugins that you can list in this array, which will be include when a user starts a session. The 'help' plugin' is a must if you ask me. Make sure you change the name of /usr/share/roundcubemail/plugins/help/config.inc.php.dist to just config.inc.php and then change this line in it

    $rcmail_config['help_source'] = 'http://trac.roundcube.net/wiki';


    Restart the apache daemon afterward

    service httpd restart


    then access your roundcube webmail with http://www.domain.com/webmail

    Have fun, it's a nice little package.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 09 2013, 08:23 PM - #Permalink
    Resolved
    0 votes
    There is an rpm howto at the bottom of the first page but it was an old package at the time. That now makes it easier as it will pull in the dependencies. (You can change my instruction as well yo do a yum localinstall and that would also have drought in the dependencies rather than pull them in first)

    I have also installed aspell as a spell checker but I can't remember how. I think there were three packages to install, php-pspell-5.3.3-23.el6_4.x86_64, aspell-0.60.6-12.el6.x86_64 and aspell-en-6.0-11.el6.x86_64 but I don't remember where I got them from.

    I don't use smtp authentication so I'm not bothered about user names or passwords but I do like your suggestions for a new set up, but don't fancy changing the default_host now I'm up and running.

    Can I ask, what was the purpose of the symbolic link to /var/www/html? I don't have it. The location of the roundcubemail installation only needs to be correct in /etc/httpd/conf.d/roundcubemail.conf which is where you can add an alias to webmail.

    Also, did your rpm give executable permissions to /usr/share/roundcubemail/bin/*?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 09 2013, 10:14 PM - #Permalink
    Resolved
    0 votes
    Thanks Nick. I guess I skipped looking at the httpd config file for roundcubemail. Creating the symlink was quick, but I like your way better letting apache handle the route. When I did the yum install it was from the roundcubemail.noarch rpm in the epel repo, so it didn't create the installer directory , but it did check for the necessary dependencies and prompt for their installation as well. I installed it after doing a yum search for it by simply entering

    yum install roundcubemail


    I did just now change the permissions in the bin folder after your prompting. Thanks.

    I've been a big fan of Zarafa and the only reason I really installed Roundcube was to see if Zarafa was causing an issue I've been having when sending mail on behalf of another email address. It will send emails on behalf of most any email address until the cows come home, but I have one email address in particular that never reaches the recipients. But I digress, that's a topic I've included in a separate post, so I don't want to make this one about my problem.

    I will add that I have the same issue using Roundcube, so it's not the apps. Enough said, but you could always look over my other post if you were curious and wanted to input.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 30 2013, 11:44 AM - #Permalink
    Resolved
    0 votes
    Hi!
    We did all, that you recommended, but when we try to access our roundcube webmail with www.domain.com/webmail,
    after put our login and password we get next message: "error to connect imap server"
    Help me, please
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 30 2013, 01:45 PM - #Permalink
    Resolved
    0 votes
    Have you looked in
    /var/log/maillog
    and
    /var/log/roundcubemail/errors
    for any clues? What mail server are you running on ClearOS?
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 10 2014, 09:22 AM - #Permalink
    Resolved
    0 votes
    Mail server postfix on ClearOS 6

    Then we try to access our roundcube webmail we get next erross in log file /var/log/roundcubemail/errors:

    PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2,0/no DST' instead in /usr/share/roundcubemail/program/lib/Roundcube/rcube.php on line 1023

    [10-Jan-2014 10:32:07 +0200]: IMAP Error: Login failed for asmodey from 172.17.17.2. Could not connect to 17.17.1:143: Connection Timeout expired in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 184 (POST /webmail/?_task=login&_action=login)

    [10-Jan-2014 10:32:07] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EET/2,0/no DST' instead in /usr/share/roundcubemail/program/lib/Roundcube/rcube_db.php on line 758
    Thank for your reply
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, January 11 2014, 05:38 AM - #Permalink
    Resolved
    0 votes
    Do you have the imap/pop server installed or a Zarafa server installed?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, January 11 2014, 10:01 AM - #Permalink
    Resolved
    0 votes
    Re the Date and Timezone issue, have a look at my original post which has two methods to fix it.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, January 11 2014, 01:21 PM - #Permalink
    Resolved
    0 votes
    imap/pop3 server no Zafara
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, January 11 2014, 01:25 PM - #Permalink
    Resolved
    0 votes
    Send me please link to your original post
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, January 11 2014, 01:40 PM - #Permalink
    Resolved
    0 votes
    ????? page 1 of this thread, first post.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 14 2014, 03:45 PM - #Permalink
    Resolved
    0 votes
    I am giving Roudcube a try, I like it, Thank You Nick & Dirk for the instructions.

    Even if I have only completed a sandbox installation, I wish to convey some findings that other might consider implementing:
    Change the 'des_key', used to encrypt the imap password stored in the session record:

    $rcmail_config['des_key'] = '...';


    In regards to the yum install:

    yum --enablerepo=clearos-epel install roundcubemail


    I compared the content to the tar file and noticed that the Hypertext Access .htaccess file was missing.
    I have not examined all the apache directives included in the Hypertext Access file but noticed some security directives.

    For implementation all that is required is to have a copy in your roundcubemail folder:

    /usr/share/roundcubemail


    and add to your apache roundcubemail.conf configuration file the following directive:

    <Directory /usr/share/roundcubemail/>
    ...
    AllowOverride All
    ...
    </Directory>

    In regards to the date timezone issue. The above Nick solution will work but sets the Apache Server directive globally.
    If one wishes to apply the modification for the roundcube application only. You can modify the Hypertext Access .htaccess file or your roundcubemail.conf with the following:

    <IfModule mod_php5.c>
    ...
    # There is an irritating feature of Roundcube. It does not like you using the system setting of timezone
    # and it prefers you to use the php setting. This is not set by default. If you do not set the timezone
    # in php your logs will see 9 messages every minute (per logged in user?).
    # This is a PITA. I have seen two similar ways round it.
    # Valid timeszone names can be found: http://php.net/manual/en/timezones.php
    php_value date.timezone <...>
    ...
    </IfModule>
    The reply is currently minimized Show
Your Reply