How to setup own mail server that forwards to …

How to setup own mail server that forwards to another mail server:

Is there a tutorial available to setup own mail server that actually forwards to another service like mailgun, aws, mailchannels etc.?

I want to have my own mail server like mail.mydomain.com. Users will come to my site for signup and they will have their own domain. SMTP will be using authentication. So basically:

user1@domain1.com –> mail.mydomain.com –> smtp relay
user1@domain2.com –> mail.mydomain.com –> smtp relay

This is outgoing so how will incoming work?

Do you think postfix will be better for this job or mailcow? I am using Debian.

submitted by /u/aliweb
[link] [comments] via Linux, GNU/Linux, free software…