I am actually not 100% sure which exit codes are used by sendmail. msmtp claims full compatibility so maybe I need to read their source code.
Maybe only use compatible exit codes if called as sendmail (not mq-sendmail) if we want detailed error reporting?
From the Exim command line specification:
-oem: the return code is 2 if the problem is that the original message has no recipients, or 1 for any other error.