There was a problem with a failed harddisk of the IMAP server. This slowed the machine down so that it was practically unusable. The problem was solved by replacing the disk.