…or: How do I set up my own mail and communication server in just 30 minutes? That’s the question I asked myself when my daughter got her first smartphone and asked for an e-mail address. I needed something which was easy to use (I’m no Linux whiz) and compatible with both the web and smartphones, which also allowed me as a parent to retain some degree of control.

I published the following article on my own blog on August 13, 2016. And because what’s good for families with daughters of course can’t be bad for companies either, my colleagues at Univention thought it would be worth publishing here too.

Kopano is a communication and sharing solution from the developers of Zarafa. As a user, I work with a web app, which displays my e-mails, appointments, contacts, tasks, etc. I can even add on a cloud storage service in order to share my photos more quickly. When I’m on the go, I always have my e-mails, appointments and contacts with me on my smartphone too. And because I set it up together with my daughter, I can see who she is exchanging e-mails with or when she enters an appointment in her calendar, which her smartphone then reminds her of.

 

Basic set-up

Setting up Kopano isn’t all that hard at all. As I already mentioned, I’m no Linux whiz, so I simply fell back on the trusty Univention distribution. The basic version is free and can be downloaded here, following quick and painless registration, as a 1.2 GB ISO image for burning to a DVD or direct launching on a virtual server.

At a colleague’s recommendation, I rented a small VPS server from netcup. It’s amazing how much you get for your money – and it’s not expensive either. Primarily, you can upload your own ISO image for installation of the operating system in the admin interface – now it’s already possible to put two and two together with the Univention image.

Registering with netcup only takes five minutes. Just a few minutes after my order confirmation arrived, a member of the team called me to verify my cell phone number and address. The virtual server was ready for use twenty minutes later. Uploading the Univention image via the netcup FTP server took next to no time, and then it was possible to start the installation. I was able to follow and steer it via a virtual VNC console. The Univention system prompts you to enter some data from time to time. When doing so, it’s important to ensure the system name and domain are specified correctly. Just 10 minutes later I was sitting in front of my own Univention server and was able to close the VNC console, accessing it via the web interface instead.

Set up Kopano

 

Now it really was just the communication components that I still needed. To set these up, I opened the App Center from my Univention server’s portal. In the same way as with a smartphone, you can now select the apps you want to work with from the selection of about 50 on offer by simply clicking on them with your mouse. These apps are not only installed, but are also immediately configured and integrated in the interface for user management.

There are four Kopano apps available, of which three can be used for non-commercial purposes. Kopano Core contains all the necessary basic components such as the database and modules for the sending and receiving of e-mails. The Kopano WebApp is the interface shown in the top screenshot, which I now work with every day. The Z-Push for Kopano app allows me to connect our smartphones. Users with a Professional subscription can also hold video calls, chat, and exchange data via Kopano WebMeetings. In addition, I also installed Fetchmail, which allows me to open e-mails from other providers we use such as Gmail via POP3 or IMAP.

It takes just two or three clicks per app to install and run the software.

All set to go!

 

The Univention portal has an eye-catching button with the word “Users” on it. Clicking on it allows you to create and manage them ;-). Although I was expecting it, I was still overjoyed when the first question I was asked was if I would like to create a Kopano account. Once I confirmed this, it was only a matter of entering a few items of standard data and I already had my first user up and ready to go.

The great thing is that all the apps here are mutually compatible. This makes it possible for me to create as many e-mail aliases as I wish in the advanced settings. By the time I’ve clicked on “Save” and leaned backwards, it is already possible for an e-mail to be sent to the address via SMTP. I can also receive the mails sent to my Gmail account via POP3 using the “Retrieve mails from external servers” menu item.

On my smartphone, I simply installed a new Microsoft Exchange account. This is done on Android phones under Settings -> Accounts -> Add -> Exchange. There I specified my e-mail address and, as the auto-discovery feature was not yet set up, then the name of my Univention server, my user name, and my password. Voilà – my e-mails, contacts, and appointments began being downloaded to my smartphone.

A little fine tuning to finish off

To ensure e-mails reach me quickly enough, I didn’t want to retrieve them via POP3 or IMAP every X minutes. For this reason, I have had my provider enter the Univention server as the “MX record” for my domain. It took around 48 hours for this change to affect the last DNS server. Since then, “Push Mail” has really been living up to its name.

In order not to land on the blacklists of the SPAM hunters, I also set up a secure e-mail relay via my provider. The server logs in to the provider and sends all e-mails via it. This was the only setting where I really had to resort to a console. I did so by starting the SSH service under System -> System Services and then connecting as the Administrator via SSH. The “ucr” command is then used to set variables that the portal does not display:

ucr set mail/relayauth=yes
ucr set mail/relayhost=<SMTP-Server des Providers>

Then I created the file “/etc/postfix/smtp_auth” using the editor of my choice:

<SMTP-server of provider> <user name>:<password>

…and enabled it for my own mail server:

postmap hash:/etc/postfix/smtp_auth
service postfix restart

You can test the whole system by, for example, monitoring the Postfix log file with “tail -f /var/log/mail.log” while you send an e-mail. If everything is functioning correctly, a line with the content “[…] postfix/smtp […] to=<receiver of test mail>, relay=<SMTP server of provider> […] status=sent […]” will appear there.

Use UCS Core Edition for Free!

Download now
Andreas Rösler

Since 2006, Andreas has been responsible for the development and support of Zarafa's German-speaking distribution network. Each day, he and his team take care of several hundred Zarafa partners and thousands of Zarafa customers.

What's your opinion? Leave a comment!

Comments

  1. Marius Peter van Dobben de Bruijn

    Hello!
    Beginning of March I found this blog entry of yours and jumped on the opportunity to combine Kopano with UCS Management. I used the Virtualbox ready download as that easily integrates the complete set into a VB-farm.

    Indeed it is as you described great beauty and easy install working together to get an email/groupware solution set up fast. Way to go !!

    There is one small catch however. Don’t know if you noticed it already. We of course use Fetchmail to pull in other incoming emails from boxes not on this server/domain. People say you can even use it to get GMail into Kopano.

    But Updating/Upgrading Univention is blocked by an version of Fetchmail which is incompatible with newer releases of UCS. As the Management Center of UCS states:
    “The currently installed release version is 4.1-3 errata360.
    Further release updates are available but cannot be installed. The currently installed version of the application Fetchmail is not available for all newer UCS releases. You may wait for the app to be released for the new UCS version. Using the “App Center” module, you may also search for alternative apps or uninstall the application.”

    • Fetchmail should not block an update from 4.1-3 to 4.1-4 – I would suggest deactivating the fetchmail repository and/or uninstalling fetchmail, then running the update and reinstalling it after the update.

  2. Hi!
    Thanks for this cool guide!
    I am new to this UCS thing but I’m really starting to like it. It was quite easy to set up a working Kopano server by following the steps in the guide!

    Until today I was using a Zarafa groupware server that I have configured with YAFFAS web GUI – which was also quite simple to handle.

    What I am missing with UCS is some sort of management interface for the Kopano server itself where I can configure settings like smart-host, what source IP may relay internal or external, etc.
    This ucr command seems not to work on my machine. And I cannot find a command line reference to see what else I can do with it.

    Am I missing something?

    Cheers
    Michael

Your email address will not be published. Required fields are marked *