Author Archives: Rainer Müller

Moby – Long Ambients1: Calm. Sleep.

Moby is one of the most famous DJs and producers. He is mostly known for his tracks in electronic music in the genres of techno, downtempo, or trip-hop. Earlier this year, however, he released an entire album as free download in the ambient style. No vocals or bass line, just calm music for relaxing. Put in his own words, this is for “when i do yoga or sleep or meditate or panic”.

Continue reading

Setting up dovecot-antispam with Spamassassin

dovecot-antispam is a plugin for the Dovecot IMAP server that automatically runs a classifier tool to train your spam filter whenever you move a mail into or out of the Junk folder. As it is written with a generic interface, its configuration allows you to configure a command to be run whenever such an event occurs. It will be called with a configurable argument indicating whether the mail should be considered spam or not and will pipe the mail itself to the standard input of the command.

# /etc/dovecot/conf.d/90-plugin.conf
plugin {
  # dovecot-antispam
  antispam_backend = pipe
  antispam_trash = trash;Trash;Deleted Items;Deleted Messages
  antispam_spam = Junk
  antispam_pipe_program = /usr/local/sbin/sa-learn-pipe
  antispam_pipe_program_spam_arg = --spam
  antispam_pipe_program_notspam_arg = --ham
  antispam_pipe_tmpdir = /tmp
}

Now this should be a sane interface for any Unix system, pipes are quite the preferred way of handling input. However, in case an error occurs, the log files will not include any helpful output from the failed program, just that it failed. Therefore I wrote a small wrapper around sa-learn(1), the tool of Spamassassin to train the Bayesian classifier.

The example script on the wiki page for dovecot-antispam uses temporary files to pass the mail content as a file. However, sa-learn(1) also accepts the common dash "-" as an argument, which internally will create a temporary file from the contents of stdin. Although this is a fully undocumented feature, I looked into the source to confirm this will work as expected. If the command fails, the wrapper script below will record the full output with logger in the mail.err facility in syslog.

#!/bin/bash
 
# /usr/local/sbin/sa-learn-pipe
 
out=$(sa-learn "$@" - 2>&1)
ret=$?
 
if [ $ret -gt 0 ]; then
    logger -p mail.err -i -t "${0##*/}" "${1//[^a-z]/}: $out"
fi
 
exit $ret

My previous way of implementing spam learning was to move spam mails into a special directory, where a cronjob would pick it up to pass it to sa-learn. Now I like this much better, as it integrates nicely with the “Mark as Spam” actions in most IMAP clients. In addition to this, I expunge old spam mails with a cronjob deleting all mails created more than 30 days ago in the Junk folder.

A custom clock face for my kitchen clock made with TikZ in LaTeX

A few weeks ago my kitchen clock broke. Actually not the clock itself did break. Instead, the clock face inside began to dissolve and fell into small pieces that hindered the hands from moving. I have no idea how that happened. It might have been the location in the kitchen above the window that includes exposure to fat and high humidity. Maybe it was a more general problem and it failed due to its age. This clock must be in my household for more than nine years now.

Finding the right size from design to printing

Finding the right size from design to printing

I pondered getting a new clock. However, I could not easily find one that both matched my expectations in price and design. Anyway, the clockwork itself is still functioning as it should and the rest of the plastic housing is also fine. Therefore, I decided to breath new life into this one by designing and printing a new clock face.

Continue reading

Die Briefmarke

Es folgt eine längere Abhandlung über meine Versuche einen Brief mit der Deutschen Post zu verschicken. Oder viel mehr meine Versuche zu diesem Zweck eine Briefmarke zu erwerben. Jeglicher Versuch dabei lustig zu wirken ist rein zufällig, denn eigentlich sollte das doch ganz einfach gehen, oder?

Es begab sich im Januar 2016, als ich eine Kündigung aussprechen wollte. Das entsprechende Formular war auf der Website der Firma schnell gefunden und ausgefüllt. Doch dann befand sich darauf der Hinweis, dass man dieses Bitte per Post oder Fax zusenden sollte. Aber ich dachte natürlich, ich drucke das einfach aus, unterschreibe, scanne es wieder ein und schicke das PDF per E-Mail. Das klappt ja schließlich oft auf diese Art und Weise. Doch, nein, die Buchhaltungsabteilung besteht darauf, dass ich die Kündigung mit der Post oder per Fax schicke. Nun gut, dann verschicke ich eben doch einen Brief. Wie so ein Höhlenmensch.

Ich muss zugeben, ich habe schon wirklich lange keinen Brief mehr mit der Post verschickt. Oder genauer, schon länger keinen Brief mehr frankiert. Die Briefe, die ich sonst auszufüllen hatte, waren immer mit dem Hinweis “Porto zahlt Empfänger” versehen oder kamen bereits mit frankiertem Rückumschlag. Diese Kündigung aber einfach unfrei zu verschicken will ich wiederum auch nicht, da ich mich doch in guten Verhältnis von dem Vertragsverhältnis mit der betroffenen Firma trennen will. Also muss ich dafür eine Briefmarke kaufen. Das Briefporto für einen Standardbrief beträgt 70 ct. So viel bekommt man ja trotzdem mit, auch wenn man die Dienstleistung gar nicht nutzt. Woher bekomme ich also eine Briefmarke?

Continue reading

Should we distrust Comodo after issuing a rogue SSL certificate for Windows Live?

About a year ago, I wrote an article why I no longer trust StartSSL. Back then, I said I switched to a paid certificate issued by Comodo under the PositiveSSL brand instead. A reader now brought a recent issue with a Comodo certificate erroneously issued for Microsoft’s Windows Live to my attention and asked whether I would still prefer them over StartSSL.

Arno wrote this comment (link):

Do you still trust Commodo to be more trustworthy than StartCom just because they asked for money to handle revocations? Think twice – a guy from Finland managed to get a valid certificate from Commodo for “live.fi”, (Microsoft Live in Finland), just because he was able to register “hostmaster@live.fi” as his e-mail-address:

http://arstechnica.com/security/2015/03/bogus-ssl-certificate-for-windows-live-could-allow-man-in-the-middle-hacks/

I started to type my answer as a comment as well, but soon I realized my explanation just became too long to be a comment, so I turned it into an article on its own.
Continue reading