While having akonadiconsole open by chance, I saw a few error messages like:
AgentBase(akonadi_maildir_resource_0): Could not move message '1521037293.R521.lapi.koller' from '/home/koller/Mail/inbox' to '/home/koller/Mail/.z_div. privat.directory/KDE-FW-Devel'. The error was Destination file exists.
and in fact this is correct - I really have some mail filenames with the same name.
I assume that this can happen when during maildownload (POP3) and filtering a mail from the inbox is moved to the filter target folder
and within the same second a new mailfile shall be created. In my case both files come from the same mailinglist.
(why also the random part is then the same seems just to be bad luck).
This patch changes the "current-time + random" way to use QUuid - which from the source seems it was the original idea but due to a Qt bug in an old Qt version, it was not used
https://bugreports.qt.io/browse/QTBUG-8374
Since this bug is solved since Qt 4.7, I feel this patch is a much safer approach to generate a unique file name.