Ok, so far so good. I can access email via Roundcube and I have configured webmail.gmcomputers.co.za to redirect to Roundcube in the virtual server templates as described elsewhere in this forum.
Now I would like to connect to my email server using Outlook 2021 and my Android phone from outside my internal network. So while I can connect Outlook to the email server perfectly using internal IP address, 192.168.0.xx, I simply cannot connect to the server from my external IP address. the URL mail.gmcomputers.co.za simply brings up my normal home website https://gmcomputers.co.za. DNS records are correctly set up at both my domain hosting provider ( I know this because at the moment I am using Kerio Mail server as my email server at home) and as far as I can see , also correctly configured in BIND.
so my question is, how do I configure Virtulamin so that I can connect to the Virtualmin email server using mail.gmcomputers.co.za, preferably without creating a new virtual server?
If mail.gmcomputers.co.za resolves (via DNS) to your external IP, the ports are open (SMTP, IMAP(s) etc) and Postfix is listening - you should be able to connect.
Since you mention internal IPs (192…) then I assume you would also need to have port forwarding in place on your router to forward traffic on those ports from the external IP to the server’s internal IP.
Hi dibs, no as mentioned, mail.gmcomputers.co.za resolves to https://gmcomputers.co.za at the moment, which is what I do NOT want.
Port forwarding in my D-Link router is set up correctly. If I enable my Kerio mail server then mail.gmcomputers.co.za reloves correctly to Kerio, however, I want to do away with Kerio and use Virtualmin. Kerio is currently disabled.
if you are using the same “server” for serving webpages (e.g. Apache) and also mail (say Postfix) then you will likely have 2 DNS entries. One for mail.gmcomputers.za and one for gmcomputers.za.
Because it’s the same server - typing both URLs into a browser will yield the same webpage. You could type both URLs into the servername fields in Outlook and it should still connect. Why? Because both addresses point to the same server.
I’m sorry, I really don’t know how to explain what I need any better. I simply want https://gmcomputers.co.za to go to my website and mail gmcomputers.co.za to be used to configure email settings. At the moment I don’t even know what the SMTP and IMAP names are, for goodness sake! I cannot even get something as simple as adding www to the front of my website URL to work!! I think honestly I just need to give up on this whole Virtualmin thing as it seems I am not experienced enough to use it. It’s a pity as it looks quite amazing. Thank you anyway for your assistance. I will look at other solutions for what I am trying to achieve.
Using Wormly SMTP test - attempting to connect to port 25 at 126.96.36.199 - it times out. Since your server\Virtualmin is behind a router with an internal (non-routable 192… IP address), this means that either no port forwarding exists or Postfix isn’t listening.
You say that you can connect to email from your internal network (192… IP address), perhaps check your Port Forward rules in the router and make sure all (SMTP, IMAP, IMAPs etc) traffic goes to the correct internal IP address of the server.
Dibs, it’s fine thank you really. I have wasted enough time on this already. I have an existing, working email server setup with Kerio Connect and my website is already set up on XAMPP for Windows, I was just hoping to consolidate all services into ne server. For now I will continue to use two separate Windows boxes. Sorry to say, but Windows just works.
Configuring a mail server correctly is very hard, and is definitely not plug-and-play. Even if you get a basic setup working – which I gather you’re having difficulty doing – the first time you send an email, your mail server will be blacklisted across the Internet because there’s a million settings that are not set up for you (DMARC, DKIM, SPIF, TLSA, etc etc, as well as a couple of dozen Postfix settings that do not come default) that must be configured absolutely perfectly or you will be flagged as a spammer. Documentation on how to set these things up is sparse, confusing, and often completely incorrect or out of date.
After you think everything is set up right, you will be flagged as a spammer because various e-mail-checking services don’t always test everything essential. For years I was happy I scored 10/10 on the popular “newsletter” email tester until I figured out email security moved past the capabilities of that a long time ago. MX Toolbox is even worse. The best one I’ve found so far is https://en.internet.nl/ . But even that one doesn’t test everything.
You don’t connect to Postfix to send and receive mail. You connect to Dovecot which communicates with Postfix. So that’s another thing to setup, but thankfully Dovecot is way easier.
You need to have a DNS MX record configured that points to your mailserver. A DNS A record set to “www” will fix that problem too.
Refer back to #1.
I realize you’ve already moved on from this project, so this is more for the next person looking into this. It’s certainly possible to set things up correctly, but you may labor under the assumption that everything’s working great, but 30% of your emails still end up in spam folders. Ever wonder why e-mails from people at Fortune 500 companies sent directly to you end up in spam? Their e-mail servers are not setup correctly.
I appreciate all the tips you are presenting and I agree that it is hard. However, I must stress that all my relevant records for my current domain, which is gmcomputers.co.za, are ALL set up correctly: DKIM, SPF, DMARC, MX and A, at my current hosting provider.
Having said that, Yes, documentation is indeed sparse and confusing. This is a source of much frustration for me, being a complete noob to Linux.
So again ,thank you for your input and yes I have moved on from this project. I am sticking with what I have currently installed, which is working perfectly.