Procmail

Procmail(1) is a filter program with which all incoming mails can be filtered/processed. If you want to know all the details, read the manual procmail(1).

Procmail can a.o be used to:
  • throw away or put in separate folders all spam-mails that have been detected and labeled as such by our anti-spam scanner
  • send an automatic out-of-office message to whomever sends you e-mail during your holiday or other absence
  • ...

This page describes the setup and configuration of the web based procmail setup.

Initialization

To configure procmail via the web interface, you need a one-time-only initialization of your mail configuration.

If you like and trust a one-click-go-ahead procedure, just execute on a departmental machine (e.g. of your research group or ssh.cs.kuleuven.be) the command below:

    setup_web_procmail

This initializes and activates your procmail configuration with a default setup, which of course consequently can be adapted as described below. This default configuration (that probably suits most people) is activated at once and the e-mails that arrive are of course processed by it directly.
If you already are using procmail, then this default configuration can of course differ from what you are using now.

If you'd rather first have a look at that default configuration and possibly customize it to your needs and desires, you can perform that initialization in 3 steps:

  1. prepare the procmail configuration, but do not activate it, with:
      setup_web_procmail extension-of-your-choice

    This creates a .procmailrc.extension-of-your-choice in your mailhome directory but leaves the present .procmailrc as it is.

  2. configure your procmail configuration as described below

  3. activate your new procmail configuration with:
      cd yourmailhomedirectory
      mv .procmailrc .procmailrc.backup
      mv .procmailrc.extension-of-your-choice .procmailrc

Configuration

With the one-time-only initialization, a default procmail configuration is installed/initialized. This default configuration most probably suits just fine ... so if you are in a hurry, don't bother to configure anything, just let it be the default.

If however you want to change anything, you can configure your procmail via this web application (only from within departmental networks or via ssh-tunnels however; authenticate with your departmental login).

The reason that this configuration web interface (and the one for your out-of-office/vacation that is described below as well) is only accessible from within departmental networks or via ssh-tunnels, is that they have to be located on a web server that has access to your private mail directory ... we will not provide such access to web servers that are accessible from within the Internet for obvious security reasons. We hope you do understand and agree with this policy.

Default Configuration

The default configuration that is installed, provides 2 basic procmail functions:

Other Configuration

Extra processing rules that you can add to your (web based) procmail are:

To forward (a copy of) calendar requests to your Zimbra account:

Add the variable below to your existing (web based) procmail to enable the corresponding processing.
Most probably you'll want to add it at the beginning of the existing file.

    CAL2ZIMBRA=on

If you don't want this forward, you should set that variable to off (or any other value besides on)

In case you don't use the departmental (web based) procmail, you can activate it in your own procmailrc by adding the following code segment to it:

    CAL2ZIMBRA=on
    INCLUDERC=/usr/local/share/cs-procmail/web/zimbra.procmail

If you don't want to forward to your departmental Zimbra calendar but to some other calendar system, you can set the variable CALADDRESS to the address you want calendar requests to be sent to.

Some variables that you can use to configure your (web based) procmail are:

  • NOSPAM=on|off (default: on)
    • if the value is on, messages that are labeled as spam, are put in the spam folder
    • if the value is off (or something else than on), such messages are not redirected to the spam folder but processed as any other message.
  • SPAMFOLDER=foldername (default: SPAM-YYYYMM)
    • the name of the folder where to put the spam messages ... YYYYMM is evaluated each time, such that a new folder is created (automatically) each month (if needed)
    • take care to use the right syntax for the foldername ... there are subtle differences between our old (mailbox format) and new (maildir format) mail servers.
    • we advise not to change the default SPAMFOLDER foldername unless you know what you are doing.
  • EMAILADDRESS=your registered official e-mail address without the @cs.kuleuven.be part
    • only messages addressed to this address will be answered by the out-of-office/vacation auto-reply
  • Some standard procmail variables and their defaults:
    • LOGFILE=procmaillog-YYYYMM in your mailhome directory
    • LOGABSTRACT=all
    • VERBOSE=off
    • MAILDIR=one of /cw/mail[1234]/user, depending which mail server processes your mail
      • every folder name that does not start with / is relative to this directory
      • so normally this is the base directory of all your mail folders
      • you shouldn't change this unless you really absolutely know what you are doing

Make sure to read our own local procmail filter documentation before changing your procmail rules or variables.

You can also consult the man page of procmailrc(5) for more information about these and other procmail variables.

But take care: if you mess things up, mail can get lost!