IMAP authentication error with Smartermail
I think the best approach would be to file an issue at https://github.com/zetacomponents/Mail/issues. It should be addressed in the mail library. There's a comment in the code near that line you changed where they have foreseen that there's this possible todo for other servers.

CiviCRM does support patching the library and does currently do that for something else, so it could be done on the CiviCRM side, but this one seems more appropriate to do in the library itself.