Emailwiz is a script that automatically sets up a simple email server. I have personally used this script to set up my email, because setting up an email server manually is a big pain. However, a friend of mine recently asked me whether he could have his own email server, with his own domain name, home directory etc. Now I thought that that is probably very easy to do, and it is, but it isn't very well docummented anywhere other then the postfix manual and some people explaining it on luke smith's github. In this guide I will show you step-by-step how to do that without the pain.
This guide assumes that you have your own email server set up using emailwiz, and at least two domains. If you don't yet have an e-mail server and want to learn how to set-up one, you can see this guide.
First, create a user on your server that is a part of the
useradd -G mail steve
Now go to
/etc/postfix/virtual, and here you will have to specify which user is using which domain. Meaning every user you create you must specify the domain to in this file. In this example, gus will be the user using the first domain.
Now go to
email@example.com domainone.com:mail:/etc/postfix/dkim/mail.private firstname.lastname@example.org domaintwo.com:mail/etc/postfix/dkim/mail.privateImportant!
You will want to set TXT records for the second domain the same way you did for the first one. Go to your domain registrar and put them in. Of course I hope I don't need to mention that you set up the second domain exactly like you would for the first one.