Under Raspberry you will never be able to have a working system like Smartermail (or anything else similar).
You need RAM, disk I / O and CPU power for any similar mail system.
Performance that Raspberry (even in its 4 versions) cannot have.
Gabriele Maoret - Head of SysAdmins at SERSIS
Currently manages 6 SmarterMail installations (1 in the cloud for SERSIS which provides services to a few hundred third-party email domains + 5 on-premise for customers who prefer to have their mail server in-house)