Mails must be sent to certain roles from certain domains. Is it possible to setup SMTP server per role? (through rules or by coding)
MTA's can usually handle complex routing, such as handling multiple domains. Your specific rub will be the connection and routing to the MTA with the appropriate credentials to send the email.
You will need to setup a custom SMTP table where each role can setup their details, then within rules (or a custom module) create the logic to connect to the MTA with the appropriate credentials.
I hope this helps, or at least provides a gateway to an exact answer.