Linux Tutorials & Things configure

Install and Configure Exim4 for send-only email [Debian]

Set VPS Time

sudo dpkg-reconfigure tzdata

Check system FQDN

hostname -f

Set system IP & hostname

sudo nano /etc/hosts


Install exim4 and mailutils

sudo apt-get install exim4-daemon-light mailutils

If exim4 config does not run or exim4 is already installed run;

sudo dpkg-reconfigure exim4-config

ScreenShots of config screens options not shown leave blank or as default. Change HOSTNAME to your systems hostname & set your own domain name

After configuration restart exim;

sudo service exim4 restart

Send a test email;

echo "This is a test." | mail -s "Testing"

If errors or email not recieved check log;

sudo nano /var/log/exim4/mainlog 

Errors encountered

Error (-53): retry time not reached for any host;

/usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null
/usr/sbin/exim_tidydb -t 1d /var/spool/exim reject > /dev/null
/usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp > /dev/null

Error Permission Denied fix;

sudo chown -R Debian-exim /var/spool/exim4/
sudo chown -R Debian-exim /var/log/exim4

Check out the Exim4 Cheat Sheet

How to Install Baikal CalDav/CardDav Server on Debian [nginx]

This tutorial assumes you have configured NGINX and php as explained Here.

What is Baikal?

Baïkal offers ubiquitous and synchronized access to your calendars and address books over CalDAV and CardDAV. Baïkal implements the current IETF recommendation drafts of these industry standards for centralized calendar and address book collections.1

Baikal Admin Page


Generate SSL Cert for new subdomain:
If you followed my Letsencrypt guide simply run;
Substitute YOURDOMAIN for the domain you will be using.

cd ~/letsencrypt/
sudo ./letsencrypt-auto certonly --standalone --standalone-supported-challenges http-01 -d dav.YOURDOMAIN --renew-by-default


Install Dependencies;

sudo apt-get install sqlite3 sqlite php5-sqlite


Configure Nginx Virtual-hosts file

sudo nano /etc/nginx/sites-available/dav.YOURDOMAINNAME

Check out my example file here

Link Virtual-hosts files;

sudo ln -s /etc/nginx/sites-available/dav.YOURDOMAINNAME /etc/nginx/sites-enabled/dav.YOURNOMAINNAME


Make Dir and generate new dhparam (for improved SSL/TLS Security);

sudo mkdir /et/nginx/ssl/dav.YOURDOMAIN

sudo openssl dhparam -out /etc/nginx/ssl/dav.YOURDOMAIN/dhparam.pem 2048

Test Nginx Config for errors;

sudo service nginx configtest


Make Directory ready for installing Baikal files;

sudo mkdir /var/www/dav.YOURDOMAIN

cd /var/www/dav.YOURDOMAIN

Download latest Baikal regular package;

sudo wget

sudo tar -xvzf baikal-regular-0.2.7.tgz

sudo mv baikal-regular/* .

sudo rm -rf baikal-regular


Restart Nginx;

sudo service nginx restart

Navigate to https://dav.YOURDOMAIN/admin and complete setup;


Official Troubleshooting Document

If 403 permission errors;

    sudo chmod -R 770 /var/www/dav.YOURDOMAIN
    sudo chown www-data:www-data /var/www/dav.YOURDOMAIN -Rf