Students should consult the KU Leuven web pages concerning their E-Mail there and the documentation about E-Mail on the web pages about the computer room for students at the Department of Computer Science.

The rest of this text describes the E-Mail configuration for members of the department.

On this page you can find :

Detailed Setup for specific E-Mail clients can be found here.

Besides using a regular E-Mail client, members of the department can also check their E-Mail by means of a web interface.

E-Mail Overview

E-Mail Client Configuration

The basic configuration for any E-Mail client is your E-Mail address, the Incoming E-Mail Server and the Outgoing E-Mail Server.
  • The details below can also easily be found using the E-Mail Configuration Web App, which gives all necessary configuration details on a single page.

  • Your E-Mail address is most probably of the form :
    (check if you are not sure, especially with very common names yours might be slightly different)
    • Firstname.Lastname(at)cs.kuleuven.be

    Any other address, although it might work, should not be used.

    You can easily find your E-Mail address yourself. Execute :

    ypmatch yourloginname mail.long
  • The Incoming E-Mail Server is :
    • mail3.cs.kuleuven.be or mail4.cs.kuleuven.be when using the IMAP protocol
    • another server when using the neither the POP nor IMAP protocol

    You can easily find your incoming mail server yourself. Execute :

    ypmatch yourloginname mail.aliases
  • The Outgoing E-Mail Server is the same as your Incoming E-Mail Server.
    • in reality all departmental mail servers can be used to send mail, but it is of course easier and thus best to just use your Incoming E-Mail Server

For reading E-Mail using IMAP, you need to specify your user name. When connecting, the E-Mail Client will ask for the corresponding password. Without a user name and its password, you cannot of course, for obvious reasons, read your E-Mail. Because this involves sending your password over the network, our imap servers only allow safe, encrypted connections (port 993). You can read your E-Mail using those protocols on those servers from anywhere on the Internet.

For sending E-Mail over a clear text connection (SMTP with or without TLS, port 25), no user name or login name is required. This is only possible from within the departmental networks. Even when your favorite E-Mail Client is able to have such a user name specified, you should not fill it in.

For sending E-Mail over an encrypted connection (SMTPS, port 465), you must use your departmental credentials. This type of connection is possible from anywhere on the Internet.

You should never allow your E-Mail Client to remember your password for you because it will be stored in an unsafe way ... otherwise the E-Mail client itself would not be able to use it again the next time, would it ? E-Mail clients (and most other programs) always store passwords using a reversible algorithm. Passwords should never be stored in such a way. Just type it in each time you start an E-Mail session, most E-Mail clients will remember and re-use it for the running session.

The actual way to setup a number of specific E-Mail clients for use with a IMAP server is described in a separate section.

If your E-Mail is not stored on one of the IMAP servers, there is little configuration to be done for the E-Mail Client of your choice:

  • run it on the server where your E-Mail is stored.
  • most probably it will work out-of-the-box without any configuration at all
  • you might need to configure it to use your correct E-Mail address, but mostly your login name will be used, which is perfectly fine. It is translated automatigally (by our E-Mail Servers) to your E-Mail Address.
  • some clients need to be configured for the Outgoing E-Mail Server, but most don't and just use whatever E-Mail infrastructure is available on the machine on which it is run. If your E-Mail Client needs some configuration, just have a peek at the description for POP/IMAP clients, you can use their configuration for Outgoing E-Mail Server as well.

E-Mail Server Configuration

The E-Mail flow within cs.kuleuven.be uses a number of special machines :
  • mailrelay*.cs.kuleuven.be
    • All E-Mail from the department to the internet and from the internet to the department flows through these machines. Mailrelay is mainly used for protection against SMTP attacks and for some SPAM prevention. (Login to this machine is restricted.)
  • dr-zook*.cs.kuleuven.be
      Dr-zook's are our Departemental SPAM notifier and Anti Virus scanner. (Login to this machine is restricted.)
  • mail3.cs.kuleuven.be and  mail4.cs.kuleuven.be
    • These machines contains the mailboxes for all users who read their E-Mail using the IMAP protocol.
      It also acts as mail switch for all E-Mail within cs.kuleuven.be.
  • st.cs.kuleuven.be
    • This machine processes all E-Mail from the computer room for students at the Department of Computer Science. E-Mail destined for members of the department is forwarded to departmental mail servers. E-Mail for students is forwarded to the K.U.Leuven student mail servers.
Typical end user machines :
  • Unix machines under sysgroup administration
  • Most of these machines have a number of E-Mail clients installed (KMail, Thunderbird, Mozilla, Pine, Mutt, mailx, Mail, ...) and can therefore be used to read E-Mail.
    Most of these machines run a recent version of sendmail and can therefore be used to send and receive E-Mail.

  • Machines under end user administration
  • These Linux workstations and/or MacIntosh and Windows PC's do not run an E-Mail system but can be used to read E-Mail by IMAP and send E-Mail by SMTP.
    (in the unlikely event that you really want to install, configure and maintain your own E-Mail server on your own machine, you can consult this page)

Consult this image for an illustrationglobal mail flow and this image for mail flow between the mailrelays, dr-zooks and mail3 or mail4 (limited availabilty).

Forwarding your E-Mail to a Different Address

If you want all your E-Mail forwarded to another address, such that all your E-Mail is together in the same mailbox, you have 2 options:

  • have that other address registered directly in our E-Mail configuration
  • use your own .forward file

The first option is the most reliable one: less E-Mail transaction steps are needed and E-Mail does not need to traverse our internal E-Mail servers. Just ask helpdesk to have your external address registered. Do notice however that you will be asked to copy or clean up all E-Mail in your current departmental mailbox because that mailbox will be removed shortly after activating your forward address.

The second option (your own .forward file) has as sole advantage that you can change the external address to forward to without the help of helpdesk. The disadvantage is that E-Mail needs to traverse our internal E-Mail infrastructure leading to more steps/hops ... in some cases these additional steps/hops might lead to the refusal of the E-Mail in question because the hop-threshold (maximum number of E-Mail hops) is reached.

We strongly advise to really consider the first option and we will do our best to react as promptly as possible to any change-requests you send ... mail is too important to experiment with and avoiding unnecessary load on our internal mail infrastructure does indeed matter.

    The single good reason to indeed use your own .forward file is when you are planning to have the forward address registered in the global mail configuration and want to forward new mail to that address right away but want to take your time sorting out your existing mail and decide what to do with it: delete or also move to your new address. During the overlap you can have new mail sent to your new address and in the same time still access your existing mail. Once your forward address is registered in the global mail configuration, your existing mail should be removed from our mail infrastructure as soon as possible to avoid all confusion about where, what and how your mail is processed.

If you do want to use your own .forward file, you must create it in your mailhome directory on the E-Mail server your E-Mail is stored on:

    cd /cw/mailhome3/$USER 2> /dev/null || cd /cw/mailhome4/$USER
    echo 'New.Address@new.mailserver.be' > .forward

Make sure to fill in the correct E-Mail address, or it won't work of course ;-)
You can check the contents of that file by executing:

    cd /cw/mailhome3/$USER 2> /dev/null || cd /cw/mailhome4/$USER
    ls -ld .forward
    cat .forward

Removing the forwarding is achieved by removing the file:

    cd /cw/mailhome3/$USER 2> /dev/null || cd /cw/mailhome4/$USER
    rm .forward

Logging in to the E-Mail servers of the department of Computer Science directly is not possible but you can do all necessary things via an SSH connection to an Intranet machine.

Setup for using IMAP

(This section describes the setup for members of the department only ... if you just want more information about IMAP, consult the Internet.)

Reading your E-Mail with IMAP is the default for members of the department.

Directories are created for you on the imap server: a mailhome-directory and a mailfolder-directory. Both directories can be accessed from any Intranet machine under sysgroup administration.

In the mailhome-directory the files necessary to process your E-Mail are created and you can modify them if needed:

  • .forward to forward your E-Mail.
  • .procmailrc and all related files and directories needed by the procmail command.
If you have none of these files in your mailhome-directory, you do not use that functionality.

In the mailfolder-directory your E-Mails and E-Mail folders are stored. In normal circumstances there is no need to access that mailfolder directory via any other way then via your E-Mail client ... so avoid doing so unless you really know what you are doing.

One of the reasons of accessing your mailfolder directory is if you have an existing directory/folder structure with E-Mails, that you want to make available to/via our imap servers. You must copy/move the files and directories containing those E-Mails to your mailfolder-directory because the IMAP server can only access files and folders in your mailfolder directory and thus the IMAP folders you want to access, must be located in it.

Do notice that such existing E-Mails must be stored in (Dovecot) Maildir format.

Example (specify your own directories and files instead):

    cd ~/
    tar cf - Mail | ( cd /cw/mail3/YOUR_LOGIN; tar xvBfp - )

(The above line can be wrapped by your browser. You should type (and thus execute) both tar commands on one line.)

Don't forget to remove the copied files from your home-directory afterwards, if all works as expected.