Connection via SSH tunnels
You can use SSH tunnels to be able to use your departmental E-Mail account from outside cs.kuleuven.be. (even from within somewhere else in kuleuven.be, certainly from within the Internet)
Other setups, using SMTP hosts within kuleuven or from your Internet Service Provider, may partially work and we therefore recommend you not to try other setups unless you know what you are doing.
The only recommended solution is :
- either to use a direct connection to our E-Mail servers to both send and receive your E-Mail.
- or to use the below SSH tunnels to send and receive your E-Mail.
- or to log in into a host from cs.kuleuven.be (using ssh) and mail it from there.
You can of course use SSH tunnels within the department as well. In this way you can use the same setup (using SSH tunnels) both from within and from outside cs.kuleuven.be.
Using SSH tunnels means you must configure not only your E-Mail Client, but also setup an SSH connection with the appropriate tunnel(s).
SSH tunnels consist of 3 parts:
- the local port number
- You can choose any (free) port you like ... it might make sense to use
a port number that reminds you of the remote port number you really are
connecting to. E.g. use 10993 as local port number of a tunnel that connects
to port 993 on the remote end.
This is the port number you should fill in in the configuration of your E-Mail client instead of the default port number shown there initially ... just overwrite it.
- the remote host/end point of the tunnel (i.e. the real server to read or send E-Mail from/to)
- In the context of E-Mail tunnels, this is one of mail3.cs.kuleuven.be, mail4.cs.kuleuven.be
- the port number on that remote host/end point
-
This is the port number that was initially shown in the configuration of your E-Mail client but that was overwritten with your local port number above.
Tunnel to Incoming E-Mail Server, use one of:- IMAP with SSL: 993
- Clear text SMTP or SMTP with TLS: 25
- SMTP with SSL: 465
Please note that you can have several tunnels in a single ssh connection ... you do not need to establish a different connection for each separate tunnel.
E.g. in a typical Unix syntax, an SSH connection with such tunnels could be setup using the command:
ssh -L 10993:mail4.cs.kuleuven.be:993 -L 10025:mail4.cs.kuleuven.be:25 ssh.cs.kuleuven.be
When using tunnels you must use localhost.cs.kuleuven.be for both sending and receiving mail servers and remember to fill in the right (local) port numbers you have used for the tunnels.
Example:
If you want to use IMAP with SSL to the server mail4 and send E-Mail with TLS via the server mail4, both via a SSH tunnel:- you must establish an SSH connection with 2 tunnels:
- from some local port (e.g. 10993) to the remote port 993 on the machine mail4.cs.kuleuven.be
- from some other local port (e.g. 10025) to the remote port 25 on the machine mail4.cs.kuleuven.be
- configure your E-Mail Client to:
- use your E-Mail Address
- connect for Incoming E-Mail with your login name to port 10993 on localhost.cs.kuleuven.be. using IMAP with SSL
- connect for Outgoing E-Mail without any login name to port 10025 on localhost.cs.kuleuven.be. using SMTP with TLS

