Sorry but you have simplified your IMAP system too far.
You MUST give to option to edit the IMAP username.
On my Linux mail server "sartrack.nz" (using Courier) the username is 'varac'. But your system blindly changed this to the username "varac@sartrack.nz", which is invalid, and cannot be changed. So I cannot use IMAP.
Please make it possible to change the IMAP username.
Bart ZL4FOX
I have similar issue on linux mint 22.1