codegeek
You can use something like Mail in a box [0] to setup your own SMTP server.

[0] https://github.com/mail-in-a-box/mailinabox

intromert
You don't need your own SMTP server for this. I'm working on a project with a similar need at the moment and Mailgun's Email Routing feature is exactly what you need.

https://www.mailgun.com/products/send/inbound-routing/

cuu508
Do you know about managed SMTP services like AWS SES? Running your own SMTP is possible but would take a lot more work to setup and maintain.