Simple Mail Server

As an admin I have to be lazy. Currently I am moving several websites to a new server. This is workload enough, so I do not want to bother with stuff like a mailserver config. Especially, as I do not really see need for it. There are enough companies offering mail services, so I only want my server to accept mails for the domains he serves and then delivering them to my (or somebody else’s) personal mail address. And of course mails generated from the websites have to be sent out.

I chose exim4 for that purpose. After setting it up (as an “internet site” with splitting into several config files) via

dpkg-reconfigure exim4-config

I created the file /etc/exim4/conf.d/router/050_exim4-config_forwarding with the following content

### router/50_exim4-config_forwarding

# This router handles forwarding of mails to
# their appropriate recipients

  driver = redirect
  domains = +local_domains
  data = ${lookup{$local_part}lsearch{/etc/exim4/virtual/$domain}}

When a new mail arrives, this file is checked first and looks for forwarding rules in /etc/exim4/virtual/DOMAIN. So to set up forwarding for mail addresses create /etc/exim4/virtual/ with one forwarding rule in each line


[UPDATE 15.02.2014]
Although only accepting mail for several domains, I got some spam problems. Spam that was sent to me was then blocked by gmail after forwarding it. As the return address was not existing, my server sent a bounce message to gmail, which was blocked again. I ended up having a lot of frozen messages. To enable some blacklisting with exim on Debian is straight forward, if you know where to look. Check out this tutorial for further information:

NetworkManager Dispatcher

To keep my data backed up savely I rely on CrashPlan. For the last weeks I had a quite long bug request pending. What I took from it, was the problem CrashPlan had when the network is not yet available when the service is started. Therefore I disabled its automatic startup and wrote a dispatcher script for the NetworkManager to automatically start crashplan, whenever I get a network connection and stop it, when the connection breaks down. Find the script here:

During mmy research I found out, that the dispatcher service was not enabled on my Arch Linux system. That’s important for the scripts to work.

$ sudo systemctl enable NetworkManager-dispatcher

Similarly the service for the modemmanager was disabled, which caused my UMTS card to not work.

$ sudo systemctl enable ModemManager

While working on this, I wrote another dispatcher script, which takes care of connecting to the univeristy vpn (works for all Munich universities, which get their internet services from the lrz) automatically, when I connect to the corresponding network. Find the script here:
The idea for this script and its frame is taken from Make sure, to save your credentials in the corresponding VPN configuration file and update the name of the VPN in the script to the one you are using.

Mendeley + BibTeX + Websites

I had some trouble to tell my LaTeX setup to correctly work with the .bib file, that is exported from mendeley.

Now I ended up, modifying my bibliography style to include the field urldate. I just changed the field lastchecked to urldate. The new style is called plainurldate.

Download it here: plainurldate.bst