Solved the previous post’s error:
TypeError: must be X509, not ComparableX509
by following the instructions in this github comment: https://github.com/mail-in-a-box/mailinabox/issues/1101#issuecomment-281026627
In short you need to run sudo pip3 uninstall pyOpenSSL
at least twice in order to remove package conflicts before reinstalling by running sudo pip3 install pyOpenSSL
.
After this I ran sudo mailinabox
with no errors!