The purpose of this blog post is to act as a visual guide/tutorial on how to setup an iOS device (iPad or iPhone) using the native apps against a custom Linux Mail, Calendar & Contact server.
Disclaimer: I wrote this blog post after 36hours with an apple device. I have never had any previous encagement with an apple product. Huge culture change & learning curve. Be aware, that the below notes may not apply to your setup.
Original creation date: Friday 12 Oct 2018
Last Update: Sunday 18 Nov 2018
Linux Mail Server
Notes are based on the below setup:
- CentOS 6.10
- Dovecot IMAP server with STARTTLS (TCP Port: 143) with Encrypted Password Authentication.
- Postfix SMTP with STARTTLS (TCP Port: 587) with Encrypted Password Authentication.
- Baïkal as Calendar & Contact server.
Thunderbird settings for imap / smtp over STARTTLS and encrypted authentication
URI for user Username
URI for user Username
There is a lot of online documentation but none in one place. Random Stack Overflow articles & posts in the internet. It took me almost an entire day (and night) to figure things out. In the end, I enabled debug mode on my dovecot/postifx & apache web server. After that, throught trail and error, I managed to setup both iPhone & iPad using only native apps.
Password & Accounts & click on
Now the tricky part, you have to click Next and fill the imap & smtp settings.
Now we have to go back and change the settings, to enable STARTTLS and encrypted password authentication.
STARTTLS with Encrypted Passwords for Authentication
In the home-page of the iPad/iPhone we will see the Mail-Notifications have already fetch some headers.
and finally, open the native mail app:
Now ready for setting up the contact account
Opening Contact App:
Almost a year ago, I wrote an article on how to install & use your personal Contact and Calendar Server & Android Client: Baïkal - CalDAV & CardDAV server
So, here are my personal notes on upgrading to it’s latest version (v0.4.6):
Github - Version
Here are the latest releases of baikal: Baikal Releases
move to your baikal installation folder and download the latest version:
~> wget -c https://github.com/fruux/Baikal/releases/download/0.4.6/baikal-0.4.6.zip
Before doing anything else, keep a local backup of your previous installation:
~> tar cvf baikal.2016-03-26.tar baikal
Uncompress - Upgrade
To upgrade baikal is really, really easy.
You just need to uncompress the above dot zip file:
With -l you can see/list the files without uncompress them to your folder:
~> unzip -l baikal-0.4.6.zip | head Archive: baikal-0.4.6.zip Length Date Time Name --------- ---------- ----- ---- 0 08-19-2016 16:09 baikal/ 0 08-19-2016 16:09 baikal/Specific/ 0 08-19-2016 16:09 baikal/Specific/db/ 0 08-19-2016 16:09 baikal/Specific/db/.empty 0 08-19-2016 15:50 baikal/html/ 0 08-19-2016 15:50 baikal/html/res/ 0 02-04-2016 09:15 baikal/html/res/core/
ok, we are sure:
~> unzip baikal-0.4.6.zip
Change the ownership to your web browser user:
~> chown -R apache:apache baikal
Now you just need to open the admin interface to finish up the upgrade:
Baïkal is a CalDAV and CardDAV server, based on sabre/dav,
To self hosted your own CalDAV & CardDAV server is one of the first step to better control your data and keep your data, actually, yours!So here comes Baikal which is really easy to setup. That easily you can also configure any device (mobile/tablet/laptop/desktop) to use your baikal instance and synchronize your calendar & contacts everywhere.
In this blog post are some personal notes on installing or upgrading baikal on your web server.
[ The latest version as this article was written is 0.4.1 ]
Change to your web directory (usually is something like: /var/www/html/) and download baikal:
Clean Install - Latest release 0.4.1
based on sabre/dav 3.1.2
You need at least PHP 5.5 but preferable use 5.6.
# wget -c https://github.com/fruux/Baikal/releases/download/0.4.1/baikal-0.4.1.zip # yes | unzip baikal-0.4.1.zip # chown -R apache:apache baikal/
That’s it !
Be Aware that there is a big difference between 0.2.7 and versions greater that 0.3.x.
And that is, that the URL has an extra part: html
to : https://baikal.example.com/html/admin
If you already had installed baikal-0.2.7 and you want to upgrade to 0.4.x version and later, then you have to follow the below steps:
# wget -c http://baikal-server.com/get/baikal-flat-0.2.7.zip # unzip baikal-flat-0.2.7.zip # mv baikal-flat baikal # wget -c https://github.com/fruux/Baikal/releases/download/0.4.1/baikal-0.4.1.zip # yes | unzip baikal-0.4.1.zip # touch baikal/Specific/ENABLE_INSTALL # chown -R apache:apache baikal/
I prefer to create a new virtualhost every time I need to add a new functionality to my domain.
Be smart & use encryption !
Below is mine virtualhost as an example:
< VirtualHost *:443 > ServerName baikal.example.com # SSL Support SSLEngine on SSLProtocol ALL -SSLv2 -SSLv3 SSLHonorCipherOrder on SSLCipherSuite HIGH:!aNULL:!MD5 SSLCertificateFile /etc/letsencrypt/live/baikal.example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/baikal.example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/baikal.example.com/chain.pem # Logs CustomLog logs/baikal.access.log combined ErrorLog logs/baikal.error.log DocumentRoot /var/www/html/baikal/ < Directory /var/www/html/baikal/ > Order allow,deny Allow from all < /Directory > < /VirtualHost >
Next step is to open your browser and browse your baikal's location,
if you have an older version (0.2.7) on your system
I use SQLite for personal use (makes easy backup process) but you can always choose MySQL .
Dashboard on 0.4.1
Useful URIs are:
Here is a sceen-guide on latest versions:
Login to the admin dashboard and create your user through
Users and resources tab
and you are done with the baikal installation & configuration process.
Applications (caldav/carddav and task clients) can now be accessed by visiting principals URI:
or via dav.php
but If your client does not support the above holistic URI, then try the below for calendar & contacts:
On android devices, I use: DAVdroid
If you have a problem with your self-signed certificate,
try adding it to your device through the security settings.