How to setup e-mail for use with Outlouk / Mailclient with Virtualmin

  • Posted December 27, 2013


I have setup mail.mydomain A and MX records, and added user to virtualmin.

How can I setup mail so that I can use it in Outlouk or any other mail client via IMAP and POP?

I have searched for tutorials, found other questions, but all with differten options. Is there a tutorial or guide on how to set this up?

Also, in my previous hosting experiences it was often possible to use some general mailserver, like Whatever domain I used, I could authenticate on their mail server as long as I created my mail account in their directadmin panel. In my case I do have a simple setup of main and subservers, with 3 simple lightweight sites. Is it possible to have the subservers (as virtualmin calls them) let use the mailserver of the main site? This would spare me lots of time for future domains/mailaccounts.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Glad to hear that! :] <br> <br>You can create a wildcard MX record but that would apply to too, simply name the MX record “*” and it should apply for every subdomain under

Yeah! Was just configuration. It is now working in Outlouk too. <br> <br>Then one more final question: I now have mail up&running for 2 domains on my VPS, however, I would like to have one central mailserver (my main virtaulmin server). I will create up to 10 light sites (sub-servers), but I don`t want to go through the email configuration part for every sub-server. Is that possible? To automatically let users for sub-servers be using the mailserver of the main server? It is kind of a shared hosting idea, where it is often possible to do so. <br> <br>Thanks!

It is now working from virtualmin, but not yet from my mailclient

Hi! It seems that I have been able to fix it. The files var/spool/postfix/etc/resolv.conf and etc/resolv.conf differs. I have now added these records to both: <br>- <br>- <br>-

Thank you for your reply. I have uploaded the screen to For privacy I made my domainname and the last part of the IP`s blank. All the blank parts are the same for domain name. <br> <br>Thanks in advance! <br>

Looks like a DNS error, can you post a screenshot of your DNS records?

Anyone? I can receive but not sent mails: <br>The following error appears in the mail. log:42C06629C7: to=, relay=none, delay=312, delays=311/0.01/0.94/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for <br> type=MX: Host not found, try again) <br>That is the error

Hi, I now have setup Dovecot and Postfix. I can connect via SMTP to my with a user added there, although I can only receive mails, not send. <br> <br>But email for my domain which is a subserver of does not work. I cannot connect via either or Both failes when trying to connect. Email for domain is enabled and my rootdomain as well my subserverdomain do have mx records from mail.domain to the IP of the VPS. <br> <br>What to do? I need to setup e-mail, but even sending an email to does not work, the mail never gets to the user if I check its inbox with webmin postfix. <br> <br>

Oh, and what I did not get out your comment? Is it possible to have subservers use the maildomain of the mainserver?

Hi Pablo, thanks for your answer! I pointed my domain to digitaloceans nameservers (because my registart did not support glue records and stuff, so I was not able to setup own DNS). In Digitalocean I added for the main domain. <br> <br>I will install postfix + dovecot modules. <br> <br>I need virtualmin because I need a scalable solution, which for now are only 3 sites, but are going to be much more in the future. And to access mail, create mailadresses/user, etc I found it easy to use a controlpanel since I am not going to do this by myself in the future, but someone with no technical skills. Virtualmin seems the best solution with many features. Or are you recommending another (free) controlpanel for basic website hosting and e-mail management? <br> <br>Thanks!