Promo plaatje

"Some quote"


The recommended alternative for procmail server based mail filtering is maildirproc

If you’re like me, you probably receive a lot of email everyday. Some of it needs our immediate attention, but most of it can be dealt with at some time in the future. In order to filter these emails into the correct categories I’d use Procmail, which is a server based mail delivery and filtering agent (MDA). You might wonder why I prefer filtering on the server?

Filtering on the server allows me to easily switch between mail clients like Mutt, Thunderbird and webmail without having to wonder about each client’s specific filtering options. The server deals with the filtering and serves my mail via IMAPS to whatever client I might use to read my mail. Procmail served me well, but it’s arcane ‘language’ to construct rules by which emails are sorted into different folders is a pain to use.

It became harder and harder for me to create correct rules to filter my mail. This resulted into less important mail cluttering up my inbox hiding the important mail and even important mail being sorted into the wrong folder. So I set out to find an alternative for Procmail.

Surprisingly it took way longer than I anticipated to find an alternative to Procmail. Apparently most people just deal with Procmail’s arcane mumbo jumbo language. After some failed attempts I stumbled upon maildirproc by Joel Rosdahl. As Joel puts it:

maildirproc is a program that processes one or several existing mail boxes in the maildir format. It is primarily focused on mail sorting — i.e., moving, copying, forwarding and deleting mail according to a set of rules. It can be seen as an alternative to procmail, but instead of being a delivery agent (which wants to be part of the delivery chain), maildirproc only processes already delivered mail. And that’s a feature, not a bug.

The greatest feature of maildirproc is not even mentioned in this quote: it uses the regular Python programming language to construct rules by which your mail will be sorted. Python is widely regarded as a great readable programming language which suits both aspiring as well as advanced developers. By using Python it is quite easy to construct rules to filter emails. The documentation and examples of maildirproc should have you up and running within minutes.

Personally I still use Procmail as MDA, but it only makes sure my emails will be put into the inbox. Maildirproc will take care of the sorting. I run maildirproc using cron, so that I can see every mail coming in, but all the less important stuff will get automatically sorted every minute or so.

I highly recommend using maildirproc to sort your email instead of Procmail!

Keep track of configuration settings during development with multiple developers and WordPress Multisite

In this post I’ve written down my methods to make deployment and changing locations of WordPress Multisite installations easier by adhering to certain assumptions

Deploying WordPress from a local machine to another location such as a testserver is annoying, because there is no easy way to export and import settings (although menu’s and other content can be exported and imported!). WordPress saves configuration options in the database and often these settings are part of serialized arrays (see Serialization) . Making it hard to change these by hand or using a deployment script. Imagine working with multiple developers, several plugins and it becomes a real pain in the ass to keep track of configuration changes.
(more…)

Howto remove ^M characters using vim

Thanks to this post on Tech recipes I can easily replace DOS/Windows line endings in files:

To remove the ^M characters at the end of all lines in vi, use:

:%s/^V^M//g

The ^v is a CONTROL-V character and ^m is a CONTROL-M. When you type this, it will look like this:

:%s/^M//g

In UNIX, you can escape a control character by preceeding it with a CONTROL-V. The :%s is a basic search and replace command in vi. It tells vi to replace the regular expression between the first and second slashes (^M) with the text between the second and third slashes (nothing in this case). The g at the end directs vi to search and replace globally (all occurrences).



Contactgegevens

Björn Wijers Burobjorn
030-123456789
Concordiastraat 68-126
3555 EM Utrecht, Nederland

Terzijde

The first step — especially for young people with energy and drive and talent, but not money — the first step to controlling your world is to control your culture. To model and demonstrate the kind of world you demand to live in. To write the books. Make the music. Shoot the films. Paint the art.
Chuck Palahniuk