Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Redirect mail button on Wiki pages OS X Server
I have seen on the Apple discussion forum that there is no solution for the mentioned redirection. Today I have found a solution which was plain simple as all things Apple.

Every time you click on the mail link in Wiki Server it will take you to SquirrelMail login screen. This screen is the login.php file.

So in order to redirect Wiki Mail to any URL of your choice you just need to edit or substitute the login.php file which is located in /usr/share/squirrelmail/ like this:
/* Redirect browser */
header("Location: http://your_preffered_url/");

[crarko adds: I haven't tested this one, but it seems pretty straightforward. As always when editing system-related files, have a known good backup.]
  Post a comment  •  Comments (1)  
  • Currently 1.46 / 5
  You rated: 3 / 5 (57 votes cast)
[3,865 views]  View Printable Version
10.7: Updating Lion Server if using CalDAV and CardDAV OS X Server
If you plan to update your OS X Server to 10.7.2 be sure to restart your machine and stop all server services, especially iCal Server and Address book server before applying the update.

It happened to me yesterday that I applied the OS X 10.7.2 update to my Mac mini server without closing any apps. I just ran it. After the update it turned out, this was a big mistake. All calendar entries of the past three weeks and many contacts were lost.

I was not able to recover anything from time machine. Lion server keeps the CalDAV and CardDAV data in a PostgreSQL database which is apparently not backed up by TimeMachine. Also, the PostgreSQL uses transactions which need to be 'closed' before they end up being permanently written into the DB tables.

What I found from reviewing the postgres log file (/Library/Logs/PostgreSQL.log) is that the 10.7.2 server update will apply a whole bunch of database structure updates to PostgreSQL but without committing the latest transaction. Given that CalDAV entries a quite small, the transaction log may contain a lot of data which is then lost.

So, be aware to make sure you have your transaction log committed before you run the update. I assume a proper server shutdown (or reboot) and stopping of the server processes will do just this. Afterwards it should be safe to update.

Alternatively (and this is my weekend-fun-duty) have a client with all up to date calendars off-line and aside which servers as a backup.

[crarko adds: I haven't tested this one. In fact, I haven't had the chance to try Lion Server at all yet. I'd be interested to hear if others have experienced issues like the one described here.]
  Post a comment  •  Comments (5)  
  • Currently 1.25 / 5
  You rated: 1 / 5 (182 votes cast)
[7,401 views]  View Printable Version
Cannot boot to NetRestore Image OS X Server
I ran into a problem recently where I was unable to boot into any of the images I had made from any Mac. I have NetRestore and one NetBoot image, but not one of my Macs could get to it. After many failed attempts, I finally tricked it into letting me boot. Here's how.

The problem actually has to do with the way that NetBoot filters computers. It used to be that you could turn filtering on and off, but now, it is not so simple. In the Image Properties window, you have the option to either all model types, or just the ones selected from a given list.

However, MAC filtering is different, you can't simply say allow all. The default selection is to allow only only those computers with the matching MAC addresses in the list below and deny others. This is what is preventing computers from being able to boot. And unless you are interested in manually entering in every new MAC address, it is impractical.

The second option is to deny only those computers in the list below and allow all others. It would be easy to select the second option, however, Lion Server has a bug that prevents you from selecting Deny Only if the list is empty. If you simply select it and save, it reverts to the default allow only option.

To get around this bug, enter in a MAC address of 00:00:00:00:00:00 and then select the Deny Only option. Save the changes and now all of your computers should be able to boot to any images you have.

Note: you'll have to make this change for every image.

[crarko adds: I haven't tested this one.]
  Post a comment  •  Comments (5)  
  • Currently 1.38 / 5
  You rated: 1 / 5 (91 votes cast)
[4,921 views]  View Printable Version
10.7: Virtual Hosts and multiple web servers OS X Server
After a great deal of searching the net for answers I have pieced together what is needed to do a couple of things I have wanted to do for some time now. The first is to have virtual hosts working nicely on 10.7 Lion Server. The second and related item is to have multiple web servers within a LAN accessible from one WAN address.

Virtual Hosts

To get this working add the following line to the /etc/apache2/httpd.conf file and then restart the web service.

NameVirtualHost *:80

Restarting the web service can be done in the Terminal using:

sudo serveradmin stop web
sudo serveradmin start web

Now you can add virtual hosts through the Server app.

Multiple web servers within a LAN accessed from one WAN address.

Set up: The following assumes that you have 3 servers with correctly working DNS and apache services. The 10.10.10.x subnet is used for the examples, change them to whatever configuration you are using.

Set up a NAT rule on your router/modem to point port 80 through to, for example, (or the address of the primary apache service that will redirect domains to their correct machine):
  • =
  • =
  • =
DNS on the primary machine should be set up as follows:
  • ZONE -
  • machine record points to
  • machine record points to
  • machine record points to
  • alias record points to
  • alias record points to
  • alias record point to
External DNS needs to be set up that points, and to your external IP address where your web server is located such as 210.55.102.xx (remember this can take up to 48 hours to become live).

Once this is done you can start adding the .conf files to the /etc/apache2/sites folder to do the redirecting.

You can name the files as you like so long as they have the .conf extension.

1st File I will call it needs the following in it to do the redirect to the correct machine:
<VirtualHost *:80>
ProxyPreserveHost on
ProxyPass /
ProxyPassReverse /
2nd File is called containing:
<VirtualHost *:80>
ProxyPreserveHost on
ProxyPass /
ProxyPassReverse /
3rd File is called containing:
<VirtualHost *:80>
ProxyPreserveHost on
ProxyPass /
ProxyPassReverse /
Restart the web service with the Terminal command:

sudo serveradmin stop web
sudo serveradmin start web

[crarko adds: I haven't tested this one. This might also be possible to do in Lion client, but the hint as is applies to Lion Server.]
  Post a comment  •  Comments (7)  
  • Currently 3.80 / 5
  You rated: 5 / 5 (10 votes cast)
[18,366 views]  View Printable Version
10.7: Setting the default timezone for calendars viewed on Wiki Server OS X Server
Apple does not seem to have provided a setting to change the default timezone despite the obvious need to be able to do so. This hint is a workaround giving a way of changing the timezone for all users who view the calendar via the web interface.

First backup the following file:


You will need root privileges to edit the file; this can be accomplished by:

sudo nano /usr/share/collabd/coreclient/app/views/projects/calendar.html.erb

Add the following line to the original file below the line <% content_for(:head) do %>:

<meta name="tzid" content="Europe/London">

Where "Europe/London" is replaced by the desired timezone.

The file should now read (in its entirety)
<% content_for(:head) do %>
<meta name="tzid" content="Your Time-Zone">
<%= javascript_include_tag "calendar/calendar_widgets_core" %>
<%= javascript_include_tag "calendar/calendar_widgets" %>
<%= javascript_include_tag "calendar/caldav" %>
<%= javascript_include_tag "calendar/calaccess" %>
<%= stylesheet_link_tag "calendar/calendar" %>
<%= stylesheet_link_tag "calendar/icalserver_compressed" %>
<% end %>

<%= render :partial => 'cc/banner' %>

<div id="content-primary" class="wrapchrome">
        <div id="module_calendars"></div>
Save the file and exit the text editor. Restart the Wiki Server using and events should now display in the correct timezone.

[crarko adds: I don't have a Lion Server up yet to try this. Remember to backup the original file before doing any editing, and post results (or alternate ways of doing this) in the comments, please.]
  Post a comment  •  Comments (1)  
  • Currently 3.17 / 5
  You rated: 3 / 5 (6 votes cast)
[4,778 views]  View Printable Version
10.6 Server: Workaround for recurring CalDAV password dialogs on iOS devices OS X Server
Follow these steps to work around an issue that causes recurring password dialogs on iOS devices that are configured to connect to a CalDAV account hosted by Mac OS X Server 10.6.

The procedure involves turning off Digest authentication and enabling Basic authentication. Since all passwords will be sent in the clear, make sure that all traffic to the iCal server is encrypted. This can be done either by requiring users to connect via VPN or by using a valid SSL certificate and setting SSL to 'Redirect' in the iCal Service settings in Server Admin.
  • Log in to an administrative user's account on the server and open the Terminal application located in /Applications/Utilities/.
  • Type the following command to change to the directory containing the settings for the iCal service:
    cd /private/etc/caldavd
  • Make a copy of the preference file. You will be asked for the administrative user's password after entering this line:
    sudo caldavd.plist caldavd.plist.backup
  • Use the nano editor to edit the preference file:
    sudo nano caldavd.plist
  • You can use the arrow keys to navigate around the contents of the preference file. First, enable Basic authentication. Go past the line that reads <key>Authentication</key>, past <key>Basic</key>, stop at <key>Enabled</key> and change <false/> to <true/> on the next line.
  • Turn off Digest authentication by going past <key>Digest</key> and stop at <key>Enabled</key> and change <false/> to <true/> on the next line.
  • Press Ctrl+X to exit the editor, press Y to save changes, and press the Enter key to confirm the file name.
  • In Server Admin, stop the iCal service and start it again.
If you need to revert your changes. Issue the following command in the Terminal application:
sudo mv /private/etc/caldavd/caldavd.plist.backup /private/etc/caldavd/caldavd.plist

[crarko adds: I haven't tested this one.]
  Post a comment  •  Comments (6)  
  • Currently 2.80 / 5
  You rated: 3 / 5 (5 votes cast)
[7,635 views]  View Printable Version
Change iCal Server invitations so they will clear spam assassin OS X Server
The default invitations which iCal Server sends may be seen as spam by Spam Assassin (score of 5.8 or so), because of a large picture attachment.

The workaround for this I found was to modify the template for the invitation to eliminate the attachment.

The templates for iCal Server invitations are located in: /usr/share/caldavd/share/email_templates.

I changed mine so they are straightforward but at least not seen as spam. For example, my invite.html is:
<p>Event: %(summary)s</p>
<p>Organizer: %(htmlOrganizer)s</p>
<p>Location: %(location)s</p>
<p>Date: %(dateInfo)s %(recurrenceInfo)s</p>
<p>Time: %(timeInfo)s %(durationInfo)s</p>
<p>Description: %(description)s</p>
<p>Attendees: %(htmlAttendees)s</p>

[crarko adds: I haven't tested this one. It's a bit of a followup to this earlier hint.]
  Post a comment  •  Comments (0)  
  • Currently 3.20 / 5
  You rated: 2 / 5 (5 votes cast)
[4,734 views]  View Printable Version
Make event emails sent from 10.6 iCal Server come from actual user OS X Server
In Server Admin, the iCal settings allow you to specify a single email from which event invitations will come. For a personal calendar though, you really want the email to come from your own email.

The script which sends invitations is found at:


It appears that it tries to find the appropriate email address, but I could not figure out how to make a value ever be present where it was looking.

So, I modified the script as shown below.
read more (117 words)   Post a comment  •  Comments (5)  
  • Currently 3.25 / 5
  You rated: 1 / 5 (4 votes cast)
[4,488 views]  View Printable Version
10.6 Virtualize machine-specific OS X Server in Fusion OS X Server
Snow Leopard only hintI did all this on a new mid-2010 Mac mini Server (with an external MacBook Air SuperDrive), with OS X Server 10.6.5 (re)installed on the upper drive (*disk1*) and OS X client 10.6.5 (and Fusion, many other apps, etc.) installed on the lower drive (*disk0*): i.e., with the computer used mainly as a client desktop rather than a server; so, virtualizing the server OS might be the most convenient solution, while - if desired - also being able to natively boot into the server (at least as an experiment).

So, you want to virtualize a whole hard drive (HD) with OS X Server installed? Or, more simply, if you want to install OS X Server onto an 'ordinary,' file-based Fusion virtual machine (VM), but only have a machine-specific install DVD (which will refuse to install if used to boot the VM), here is what I did.
read more (517 words)   Post a comment  •  Comments (6)  
  • Currently 2.75 / 5
  You rated: 1 / 5 (4 votes cast)
[15,119 views]  View Printable Version
10.6: Exclude Software Update data in Time Machine backups OS X Server
Snow Leopard only hintUsing the Time Machine preference pane, it is not possible to effectively exclude the data for the Software Update service from Time Machine backups on Mac OS X Server 10.6. A method is presented here which will do that.

By default the software downloaded from Apple’s servers necessary for the Software Update service is located at /private/var/db/swupd. When excluding this directory using the Time Machine preference pane the path is changed to /var/db/swupd (/var being a symbolic link to /private/var) and the data is still backed up. [crarko adds: This is for Snow Leopard Server only.]
read more (148 words)   Post a comment  •  Comments (13)  
  • Currently 2.25 / 5
  You rated: 5 / 5 (12 votes cast)
[9,045 views]  View Printable Version