I have been trying whole day to setup e-mail using webmin`s modules dovecot and postfix on my VPS.
I have a main domain (let call it mydomain.com), and a sub-server domain , lets call this one mysubserver.com
On mydomain.com I added Mx record mail.mydomain.com. If I add a user to mydomain.com using virtualmin, I can succesfully connect to this account using smtp and I can receive emails in my mail client, or inbox on webmin (sending mails do not work yet). However, as mentioned I have setup a sub-server (and more to come in the future). I created a account: email@example.com.
Basically, what I want to do is this: - Any account I create in mysubserver.com can use the mydomain.com SMTP setting. So, firstname.lastname@example.org can connect via mail.mydomain.com over SMTP / IMAP. Basically, this is the idea of most shared hosting servers.
How to set this up?
PS. mailing on my sub-server does not work at all. I enabled e-mail for this domain, and dovecot, postfix, etc is running. However, I cannot connect to this domain via SMTP or IMAP using either mail.mysubserver.com or mail.mydomain.com.
What to do? Any step by step guide on how to set this up?