Author Topic: Guide to Installing Roundcube on Mac OS X Leopard Server  (Read 30370 times)

Offline berylium

  • Newbie
  • *
  • Posts: 4
Guide to Installing Roundcube on Mac OS X Leopard Server
« on: October 09, 2008, 04:27:23 PM »
Hello,

I manage a Mac OS X Leopard Server for a small business.  While I suspect the next release of Mac OS X Server, Snow Leopard, may include a more user friendly webmail application I wasn't very excited about waiting another year for it and SquirrelMail was getting on my users' nerves.

I looked around the internet for webmail alternatives and stumbled upon Roundcube.  I gave Roundcube a shot and have been really enjoying it so far, even in it's .2 incarnation.  While installation of Roundcube is fairly strait forward I did need to consult a few different websites and perform some trial and error on the settings file.  

Because I haven't seen any other Leopard Server specific tutorials on the internet for installing Roundcube I decided to make one myself.  I wrote it primarily to have a reminder of what steps I took in case I need to reinstall on a fresh machine at some point in the future.  I wanted to make it available to anyone else who has a Leopard Server in case it might be useful.

You can download the .pdf here: Guide to Installing Roundcube Webmail on Mac OS X Leopard Server

The guide walks you through, downloading Roundcube, installing Roundcube, and running the necessary services (MySQL and Web).  The guide assumes you're running Mac OS X Leopard Server and its Mail service and the recommended settings are tailored as such.

If you have any comments on the guide please PM me.

take care,

berylium

UPDATE 2009.10.15
I finally updated my .2 beta installation of Roundcube to .3 stable.  All the instructions in my guide still hold true.  The only changes I would make (that weren't worth updating the guide) include:

- In step 3, those 'chown' commands may need to be preceded with 'sudo'.  e.g. "sudo chown -R www:www temp"
- My download of .3-stable did not include the image file rcube_watermark.png.  Since this image is shown in the preview area any time a message is not selected I was seeing a lot of blank squares with question marks since the web browser couldn't find the file.  To fix I just copied rcube_watermark.png out of roundcubemail-0.2-beta/skins/default/images and pasted it in the same folder in roundcubemail-0.3-stable.

So if you're installing Roundcube for the first time in Leopard Server (10.5) then the linked guide with the above changes should work for you.  If you're updating Roundcube just be sure to keep your old roundcube folder around so you can update the new main.inc.php and db.inc.php files with the settings you used in the old files.

As for people who have questions setting up Roundcube in Leopard Server, I wish I could be of more help to you but the guide I made is pretty much the full extent of my Roundcube knowledge.  So if you're running into problems after your installation my only suggestion is to search the roundcube forums and run a web search on your error, maybe someone else out there has documented a fix.

-berylium

UPDATE 2009.10.31
I updated from .3 stable to .3.1 and, again, there were no issues.  If you already have Roundcube .2 or .3 installed these are the steps you would follow to upgrade:

1. Step 1 from the linked guide
2. Step 3 from the linked guide, but be sure to run both chown commands as root with sudo.  e.g. "sudo chown -R www:www temp"
3. Step 7(a) and 7(b) from the linked guide

At this point your websites folder on your server will have the roundcube installation you've been using (roundcubemail-0.2-beta, roundcubemail-0.3-stable, etc.), the .3.1 roundcube installation folder (roundcubemail-0.3.1), and the folder symbolic link created in step 2 of the linked guide (roundcubemail).

4. Using a plain text editor open the db.inc.php file in the config folder of your old Roundcube installtion and the same file in the .3.1 config folder.  Update db.inc.php from the .3.1 installation with the database info you entered into db.inc.php in your old installation, it's line 21 in the file.  Close both files saving the changes on the .3.1 db.inc.php.
5. Open the old and the new main.inc.php files.  Scroll through the old file and make sure any changes to settings you made in the old file are inserted into the new file.  This way, apart from the new features, your old and new installations will be identical.
6. Step 2 from the linked guide but updating the folder name for the .3.1 installation.  "sudo ln -s /websites/roundcubemail-0.3.1 /websites/roundcubemail"

Now the symbolic link used by the web service to send requests to the old Roundcube installation will be sent to the .3.1 installation.  Make sure and go to your site to make sure everything works but you should be all done.

P.S. If you broke something and your site isn't working properly you can re-link the symbolic link back to your old installation while you troubelshoot the problem so your users aren't left in the cold.  This is why we didn't delete the old installation folder(s).  For instance, if I was using .3 and I upgraded to .3.1 but broke something in the process I would: open the Terminal, 'cd' to my websites folder, and run "sudo ln -s /websites/roundcubemail-0.3-stable /websites/roundcubemail"  Now visitors to my site would be linked to the working .3 installation while I fixed .3.1.

take care,

berylium
« Last Edit: October 31, 2009, 04:27:54 PM by berylium »

Offline Kobold

  • Newbie
  • *
  • Posts: 1
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #1 on: November 17, 2008, 05:53:30 PM »
Thank you for your guide. I'm going to use it.

Offline Hooloovoo

  • Newbie
  • *
  • Posts: 1
Almost there
« Reply #2 on: July 18, 2009, 09:17:02 AM »
Hi,

Thanks very much for the guide, it helped me a lot. I had it configured right away to read all my messages of my IMAP OS X Server. When I tried to send messages however, the webinterface hung on "sending message" and I saw in the web error log a repeating permission error:

postdrop: warning: mail_queue_enter: create file maildrop/620647.7625: Permission denied

Any ideas?

Best regards,

Paul

Offline prezmc

  • Newbie
  • *
  • Posts: 1
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #3 on: October 25, 2009, 11:35:50 PM »
Berylium,

I'd never browsed the RoundCube forums until I decided to put in on my Leopard Server.  Your post is awesome, I really appreciate the work you put into making this guide.  It worked very well, and my roundcube instance is running great.

Thanks again,
Shannon

Offline taittinger_hi

  • Newbie
  • *
  • Posts: 1
installing roundcubemail on Mac OS X Snow Leopard Server
« Reply #4 on: January 28, 2010, 03:19:09 PM »
Hi,

Thanks berylium for your excellent guide to installing Roundcube. We installed Roundcube 0.3.1 on Mac OS X Snow Leopard Server 10.6.2. We have one issue:

When we send a mail from the roundcube mail interface, the recipient gets an empty "From" address and header code in the body part of the message. BTW, we did fill out the "Identities" tab in Roundcube.

Anyone else facing the same issue?

When we check the raw e-mail source, we see this:

Code: [Select]
Return-Path: <user@example>
X-Spam-Status: No, hits=2.3 required=5.0
tests=BAYES_00: -1.665,FH_DATE_PAST_20XX: 3.188,MSGID_FROM_MTA_HEADER: 0.803,
RDNS_NONE: 0,TOTAL_SCORE: 2.326,autolearn=no
X-Spam-Level: **
Received: ...
Thu, 28 Jan 2010 21:03:20 +0100
Message-Id: <3493ff$btjoq6>
Date: 28 Jan 2010 21:01:49 +0100
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AgEFAF17YUtXQgRc/2dsb2JhbACBNI4xAcxIgX4E
Received: from ...
  by gateway with ESMTP; 28 Jan 2010 21:01:49 +0100
Received: by example (Postfix, from userid 70)
id 4D87D4B9C4; Thu, 28 Jan 2010 21:01:48 +0100 (CET)
To: <recipient@example>
Subject: testmail
X-PHP-Originating-Script: 501:func.inc

MIME-Version: 1.0
Received: from [192.168.1.102] ([192.168.1.102])
by example.com
with HTTP/1.1 (POST); Thu, 28 Jan 2010 21:01:48 +0100
Date: Thu, 28 Jan 2010 21:01:48 +0100
From: User <user@example>
Organization: Company
Reply-To: user@example
Message-ID: <19d83690f5f9a6268b64f6f1ffc8547b>
X-Sender: user@example
User-Agent: RoundCube Webmail/0.3.1
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8


testmail


Thanks in advance!

Kind Regards,

Tom

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363

Offline harryatkins

  • Newbie
  • *
  • Posts: 1
Server Address Book
« Reply #6 on: March 18, 2010, 01:09:32 PM »
Hi,

Thanks so much for your guide! It was really useful and I now have Roundcube up and running on my Mac OS X mac mini server perfectly...I was wondering though if it was possible to implement the Server address book to appear when you click the 'Address Book' link on the Roundcube home page? Instead of the default empty one?

Many thanks in advance for any help anyone can offer??



regards

Harry Atkins

Offline berylium

  • Newbie
  • *
  • Posts: 4
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #7 on: April 14, 2010, 03:17:05 PM »
Harry,

Address Book Server on 10.6 server is a CardDAV server.  Unfortunately, there are no available plugins for Roundcube that support linking to a CardDAV database.  CardDAV is an open protocol and my understanding is that it would not be extremely difficult to program but it is certainly outside of my wheelhouse.

iCal Server uses CalDAV and while there are no Roundcube plugins that currently support linking to a CalDAV server I know one exists for Squirrelmail and that Roundcube forum user rosali has been working on a calendar plugin that may one day support linking to CalDAV.

-berylium

Offline cariduit

  • Newbie
  • *
  • Posts: 1
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #8 on: April 14, 2010, 08:49:36 PM »
Thank you for the information. I also have several problem by installing round cube

Offline ericx

  • Newbie
  • *
  • Posts: 5
Change suggestions
« Reply #9 on: June 10, 2010, 03:00:59 PM »
Thank you for a handy document.

I don't know if you have the time to maintain this; but I have a few thots about what you might change. I don't have access to Snow Leopard yet; so these are only relevant to Leopard.

At some point, Apple changed the default user and group for apache to _www:_www; so the command to chown the temp, config, and logs dir needs to be updated.

When activating mysql, I would not turn on "Allow network connections." Strictly speaking, this is only interesting if you want to access the mysql from a separate computer. Without network support mysql limits its connections to a socket on the computer which is perfectly fine for anything running on the same machine. If you leave the network connection off, you obviate the need to firewall against intrusions. -- However, it is worth noting that the Apple GUI is broken (no real surprise), /etc/my.cnf still has the line "skip-networking" disabled. To really fix it, you have to edit my.cnf yourself.

This is no reflection on your document, but I have a hard time granting the roundcube user "all privileges" in the mysql. You only need that if the web application genuinely needs to create new tables later. Better to use your root user to create the tables in the new database, and limit the roundcube user to "select, insert, update, delete" and possibly "create temporary tables, lock tables" if needed (I turned them on because I haven't really looked at the code to see whether they are necessary). This is a safer practice in case the web GUI has any undiscovered vulnerabilities that allow an attacker to submit arbitrary SQL commands.

Since the db_dnsw setting contains the username and password used to connect to the database, it's not really a good idea to leave that file world-readable. I usually change the group ownership of everything in config to _www and change the permissions to 640; so that you can still read/write the file and apache can read it; but no one else. main.inc.php potentially might also contain authentications (e.g. ldap); so it makes sense to restrict access to that file too. mimetypes.php will probably never have anything sensitive; but chown -R netadmin:_www; chmod -R 640; is easier than explaining that.

The datetime format string is somewhat standard unix kruft and the php documentation can be found at: PHP: date - Manual

Sadly, the naming conventions for Junk, Sent, etc. have nothing to do with Cyrus or Leopard; but rather are functions of the mail client you use. Clients like Outlook are obnoxious in that you cannot change their names for consistency while Thunderbird even lets you change the name of the Trash folder (if you are willing to edit the .js config file by hand). This makes the default settings in RoundCube (and any other web mail) somewhat problematic unless your users all use the same client.

Offline berylium

  • Newbie
  • *
  • Posts: 4
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #10 on: June 10, 2010, 03:10:02 PM »
ericx,

Hi, and thanks a lot for your response.  I have been maintaining the guide as much as possible.  In fact, I’ve had an updated version of the guide for Snow Leopard Server ready to go for a while now.  However, I updated the guide with Roundcube .4 in mind and didn’t want to release it until .4 was more stable.  I’ll definitely go through your suggestions and add them to the guide as necessary.

Offhand, I already cover the datetime formatting in the updated guide.  And as for the folder naming conventions it is assumed that users will be using Mail.app but I’ll be more clear about that.

Again, thanks a lot — you seem to know much more about mySQL than I do ;)

-berylium

Offline stevehoweuk

  • Newbie
  • *
  • Posts: 1
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #11 on: October 25, 2010, 04:56:45 PM »
Hi berylium

Do you have a copy of the updated guide?

I have just rolled out a 10.6 server upgrade roll out and am interested in bringing webmail to the school concerned and roundcube appears to offer the best uniformed interface for cross platform users.

Thanks

Steve

Offline tycho

  • Newbie
  • *
  • Posts: 1
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #12 on: November 15, 2010, 06:58:25 AM »
Hi berylium,
if you send me a copy of your updated guide for Snow Leopard / Roundcube 0.4 I'd like to test it and could give feedback.

Thanks

tycho

Offline mprewitt007

  • Newbie
  • *
  • Posts: 1
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #13 on: December 02, 2010, 01:21:33 AM »
I too would really like the guide for SLS? I am evaluating changing from the squirrel to the cube...  :)
 Mark

Offline macmanx

  • Newbie
  • *
  • Posts: 1
Guide to Installing Roundcube on Mac OS X Leopard Server
« Reply #14 on: December 16, 2010, 07:40:44 AM »
Quote from: mprewitt007;31614
I too would really like the guide for SLS? I am evaluating changing from the squirrel to the cube...  :)
 Mark


Hi all...

I installed Roundcube 0.5 beta yesterday using the guide from 'Richard' found here: DIYMacServer: Installing Roundcube for webmail

don't forget to enable mod_php on apache, if you dont enable webmail this is not enabled....

Cheers macmanx