Work related to Courier-Server

I wrote this article originally back in 2005 and updated it the last time on 2007-10-14. It was originally available at http://www.georglutz.de/wiki/CourierServer.  The information you find below might be rather outdated now and I don’t plan to work on it further, but I put it in the blog for archival purposes on this particular date – Georg in June 2011.

Couriermlm

Couriermlm ist the mailing list manager included in the package. couriermlm automatically handles requests to subscribe and unsubscribe list members, detects undeliverable addresses and removes them from the subscription rolls. couriermlm supports digests, write-only posting aliases, and moderated mailing lists.

Languages

Currently couriermlm does not support multiple languages. But its possible to alter the templates for the messages which are sent out in emails. I have done this for the german language. You can download it here: couriermlm-de-0.45-6.tar.gz . Its for version courier-0.45-6 and higher. But since the original templates have not changed, it can still be used up to version courier-0.52.2 .

Just copy the files in the “de”-directory of couriermlm-de-0.45-6.tar.gz over to the directory where the original templates are installed (usually /usr/lib/courier/share/couriermlm). This means that for every mailing list created with couriermlm create these templates are copied to the list directory.

Web administration

Normally, administration is done with couriermlm in the command line. However with couriermlm you have to switch to the user id under which the list runs, before you can make any changes. This might not be feasible in a situation in which more than one person should have the right to alter the subscriber list or the persons are not familar with command line administration.

For this purpose I have written a small perl cgi script which runs suid (with the same uid as the list). The script is a simple wrapper around the couriermlm-command. It does essentially the following:

  • show login form for the user
  • authenticates users with name/password via ldap
  • show available lists (listnames and path are configured in @lists)
  • lets user select list
  • user can delete an addresses or add a new one
  • logoff

You can download it here: cmlm.pl.gz .

Screenshots

Login-Screen:

Show available lists:

Add/delete subscribers:

Greylisting

Greylisting is a technique for spam avoidance which takes place at the SMTP level of your mail server. Courier has no builtin support for greylisting, but there exists a filter API for different filter purposes (courierfilter). courier-pythonfilter by Gordon Messner is a python framework for developping courierfilter programs in python.

Based on the pythonfilter script greylist.py from Mik I have written a greylisting implementation with the ideas in Evan Harris whitepaper.

Update: Main parts of this code are now included as “greylist” filter in Gordons pythonfilter distribution (look there). If you want to have a look at my original implementation you can fetch it under pythonfilter-greylist.tar.gz. Please look also at the   documentation.