The tools and tutorials on this site are free to use for time being.

Roundcube for macOS Server

What’s new in version 1.3.6?
  • Mac OS X Server 10.8.3 w/ Server 2.x – through -> 10.13.x High Sierra w/ 5.6.x
Why we made this installer

Mac OS X Server administrators usually wear many hats (entrepreneur, designer, etc.). We choose the Mac expecting it to have a nice GUI interface and all our basic needs to be met out of the box.
Apple used to provide webmail services in earlier versions of OS X Server (10.7 and earlier). For reasons unknown, webmail was dropped in 10.8 leaving it up to administrators to roll their own solution.

An OS X Server administrator with a Unix background could jump through all the hoops in a couple of hours – but lets face it, most OS X Server administrators would be stuck facing a day or more of tutorials, articles and frustration to get webmail working on their server.

As consultants specializing in mail services for OS X Server, we found ourselves repeating the same steps over and over with each new server installation. So we decided to apply our rule of thumb: if a repeatable process takes more than 30 minutes – document, automate and share.

What does the installer do?

Our installer for Roundcube for OS X Server installs Roundcube Webmail as a simple WebApp available to any website configured inside When the WebApp is enabled (by default, its enabled for all sites), you can access webmail by adding /mail /webmail or /roundcube to your website URL.

Please browse our FAQs for answers to most questions.

See current changelog for a complete list of fixes and additions.
Please read our FAQs as well.

The topicdesk Roundcube installer is a free download.




spamtrainer assists Mac OS X Server mail services administrators in updating and maintaining their SpamAssassin bayes database.

spamtrainer will read the designated HAM and SPAM mailboxes, update the SpamAssassin databases and delete mail that has been learned from.
It has an array of additional functions. Among them the possibility to backup/restore your bayes database and many more.
This script is written for OS X 10.8.x, 10.9.x , 10.10.x, 10.11.x, 10.12.x and 10.13.x with Server 2.x/3.x/4.x/5.x. A separate release is available for earlier OS X versions.

See current changelog for a complete list of fixes and additions.
Please read our FAQs as well.

spamtrainer is a free download.


Download spamtrainer 2.2.3
Get help for spamtrainer


Changelog: Roundcube for OS X Server

1.3.6 Released 2018-06-01
  • Supports High Sierra and Server 5.6.x
  • Includes Roundcube Webmail 1.3.6
  • new_user_dialog plugin is enabled by default for new installation
  • Improved CardDav plugin installation
    • RCMcarddav_3.0.2
    • Disables carddav plugin installation if AddressBook service is not running
    • Detects CardDav server configuration and configures the plugin.
1.1.4 Released 2016-02-19
  • Roundcube Webmail 1.1.4
  • El Capitan and Server 5 support (SIP compliant)
  • Updated MCrypt installer (SIP compliant)
  • Updated managesieve (mail filtering, vacation auto-responder)
  • Improved installer logging to /var/log/install.log
  • Optional plugins, automatically configured
    • CardDAV Address Book
    • HTML5 Desktop Notifications
    • Multiple message selection
    • Image Paster (paste clipboard images directly into message)
1.0.3a Released 2014-11-24
  • Yosemite Compatible (10.8, 10.9, 10.10)
  • Includes Roundcube 1.0.3
  • Postgres no longer supported, moved database to sqlite
  • Updated Mcrypt to support Yosemite and PHP 5.5.14

The 1.0.3a installer performs a CLEAN installation and replaces your previous version.
Existing user preferences and roundcube config are not saved.

Note: The roundcube config files have changed.

0.9.5a Released 2013-12-5

The installer will upgrade from 0.9.0 retaining the same config and database
Added /history.txt to view your installation history

  • We now install Roundcube 0.9.5
  • Compatible with OS X Server 10.8/10.9 with Server App 2.2 – 3.01
  • Added auto-configuring carddav plugin
  • Enhanced the mcrypt installation to not touch an existing/working mcrypt
    If mcrypt is not installed, we install the proper libraries for 10.8 and 10.9
  • Improved Roundcube config defaults (only applies to clean installations)
$rcmail_config['mail_pagesize'] = 100
$rcmail_config['addressbook_pagesize'] = 100
$rcmail_config['show_images'] = 2
$rcmail_config['htmleditor'] = 1
$rcmail_config['preview_pane'] = true
0.9.0 Release 2013-01-10

First Public Release
Installs Roundcube 0.9.0 WebApp

SpamAssassin Filter for New TLDs (.xyz .info .ninja etc)

Have you seen an increased spam from new TLDs (top level domains like these)?

.link, .xyz, .info, .ninja

This short tutorial demonstrates how to create a filter to add points for messages that are not from a list of preferred TLDs.

Important: This filter is not for everyone and you should adjust for best results considering your mail traffic and typical senders. You also should be familiar with editing plain text configuration files.1

Lets get started:

The local configuration for SpamAssassin is stored in this directory:


Within this directory, you can customize SpamAssassin with configuration files for filters, whitelists, blacklists, score overrides and more. These config files must end in .cf and are processed in alphabetical order. When the same setting is repeated, the last occurrence wins.

Your additions should load last, so we’ll call this new filter:

Lets think about the goal.

We want to reduce spam, but still accept/deliver legitimate mail from these TLDs.
SpamAssassin runs hundreds of tests, and they all have a subtle effect on the final spam score.
We don’t want to be too heavy handed. For our example: we’re going to add 1.5 points to the final score.

Here’s our filter:

file: /Library/Server/Mail/Config/spamassassin/

# add points if the From address is not a valid host in a listed TLD
header      LOCAL_FROM_TLD  From   !~ /@[a-z0-9\-\.]+\.(com|org|net|mil|edu)/i
describe    LOCAL_FROM_TLD         From address is not a valid host in a listed TLD
score       LOCAL_FROM_TLD  1.5

Lets break it down:

This is the meat of the filter. We are searching the From header for mail not !~ matching the regex expression. The regex expression has two parts.

Part 1: /@[a-z0-9\-\.]+\. catches a legit hostname ( without the TLD (com, org, etc). spammer@spam! would be caught because ! is not allowed in a hostmame.

Part 2: (com|org|net|mil|edu) is the list of TLDs we do not penalize. Edit this list to include any TLD you typically receive mail from. Note: the filter ends in /i. A spamassassin expression begins with / ends with / and the i means case insensitive.

Description of the filter

We are adding 1.5 points.
Remember, this is a negative match !~, so we add 1.5 points when the TLD is not com|org|net|mil|edu.


If you decide to implement this ‘as-is’, copy/paste the following in Terminal:

echo '# TLD Filter
# adds points if the From address is not a valid host in a listed TLD
header      LOCAL_FROM_TLD  From   !~ /@[a-z0-9\-\.]+\.(com|org|net|mil|edu)/i
describe    LOCAL_FROM_TLD         From address is not a valid host in a listed TLD
score       LOCAL_FROM_TLD  1.5' | sudo tee -a /Library/Server/Mail/Config/spamassassin/

sudo launchctl stop org.amavis.amavisd
Test and Verify Results

Test your mail system, make sure you are able to send/receive.

Watch the amavis log located at /Library/Logs/Mail/amavis.log and you should see hits.

From your mail application, check for the x-spam-status header.

Check if syntax, typos or other errors in this filter have caused any errors:

sudo -u _amavisd -H spamassassin --lint -D 2>&1 | grep LOCAL_FROM_TLD


Document Version 1.0, 11.2.2016

  1. If you are unsure about how to edit a configuration file, have a look at our tutorial on how to edit text configuration files on OS X Server 

Setting Logging Levels for Mail Services on OS X Server 5

With OS X Server 5, Apple has further modified logging level and files for mail services. This setup is well thought out for occasional log peeking through, but can make it a bit cumbersome for troubleshooting since different log levels are written into separate log files, rather than a single one.

The most important logs for a mail server are:


These logs cover the SMTP, IMAP and SPAM Filter parts of mail services.

If you are curious, there are more logs here:


When troubleshooting, most of the time we have to focus on SMTP and SPAM Filters. IMAP, which is provided by Dovecot, tends to give very few issues nowadays (while this wasn’t true in the pre 10.6 era where Cyrus was used).

So let’s focus on SMTP and SPAM Filters.

The SMTP logs are written into /var/log/mail.log while the SPAM Filter logs we usually need are written into /Library/Logs/Mail/amavis.log

The amount of information written into these logs depends on the logging level. The ones we care about are typically notice, info and debug

Most of the time you want your log levels to be at info. This gives you plenty of information for troubleshooting the most common issues. When running into real trouble, you might need even more detail which you get by setting the level to debug. Some object to keeping info on all the time as they claim that this generates lots of log entries and load on your server. Truth is, unless you are running mail services with hundreds of thousands of messages a day, this will never be an issue. Should you want to reduce the number of entries, you can set the log level to notice, but will have to compromise on the log detail you get.

Another factor is the time your log remains available before being rotated and archived or deleted. A good default setting is usually 1 day. However, most OS X Server mail servers aren’t so busy that you need to rotate daily, so setting it to 3-7 days gives you more detail to work with in the current log, rather than having to dig out archived logs. This is especially important if you suspect a breach and want to have a quick look at the past 48-72 hours.

Having said that, here is how to set what we discussed above:

sudo serveradmin settings mail:postfix:log_level = "info"
sudo serveradmin settings mail:postfix:spam_log_level = “info”
sudo serveradmin settings mail:imap:log_level = "info"
sudo serveradmin settings mail:postfix:log_rolling_days_enabled = yes 
sudo serveradmin settings mail:postfix:log_rolling_days = 3

To check your settings, you can for example issue:

sudo serveradmin settings mail:imap:log_level

Besides above log related commands, there are many more parameters that can be viewed or set via the command line. For an overview, issue:

sudo serveradmin settings mail

Be careful when unsure about changing a parameter and always make sure you have a working backup.

Another option is to merge SMTP and SPAM Filter information into one log. This of course comes down to personal preference. I like it, because I can follow the entire flow of an incoming or outgoing e-mail through SMTP and all connected filters, rather then having to peek into two separate log files.

To do so, edit1

and make sure the necessary parameters are set as follows:

$log_level = 3;
$DO_SYSLOG = 1;              # log via syslogd (preferred)
$syslog_facility = 'mail';

From now on, all SPAM Filter log entries will be written into /var/log/mail.log rather than /Library/Logs/Mail/amavis.log for easy troubleshooting.

  1. If you are unsure about how to edit a configuration file, have a look at our tutorial on how to edit text configuration files on OS X Server