Virtualmin can't receive email but can send

Hello everyone… I’ve just set up Virtualmin on a clean Ubuntu 18.04 server. Everything seems to work except the email. I can send email with no problem, but I can’t receive it. Hover is my hosting company and I’ve set the MX record to my IP address. I also set the A records to my IP address. I’ve created another A record that says mail which is also pointed at my IP address.

I’m a newbe at setting up email… so I’m sure there is something simple I’m missing here! Your help is greatly appreciated! I only have so much hair left on my head as I’ve been pulling it out trying to solve this for weeks now!

Dan Lewis

Don’t pull hair out. It does not help, trust me.

Check if your MX records are set up correctly and have propagated. Virtualmin expects mail.domain.tld to point to the same IP as domain.tld and www.domain.tld. With this done, the MX records of domain.tld should point to mail.domain.tld. You have now configured your domain to use mail services.

If your Virtualmin installation was error free and mail has been enabled for the virtual server associated with domain.tld then you should be able to receive email for any user that you have created for the virtual server.

It is as simple as that.

I thought it was probably simple and I’m over thinking this whole thing. That happens when you’ve tried it too many times… and I have! Here is the way I have my DNS records set up.

Could someone who is knowledgable about the DNS setup let me know if this looks good?

Try changing “mail.domain.tld” to “mail.hostname.tld” in MX and A.

So… “mail.server1.domain.tld” for example. Also make sure you have an A entry for the hostname itself.


Thank you Richard. So it should look like


Then I should add an A record that is in addition to the ones I currently have

Am I following you correctly?

Dan Lewis

Yes, assuming that

is the server’s hostname, then try

If it’s, say,, then try

By the hostname, I mean the server’s full hostname. Not just the domain, but servername.domain.tld. I’m assuming this is a server since you said you installed it from scratch. You need an A entry for the hostname.

You can find out the hostname if you don’t know it by typing hostname in the terminal. Some things actually do make sense in Linux.


I tried doing what you suggested and it didn’t seem to make any difference. When I send to my Yahoo account it almost instantly receives the message. But then I reply and nothing comes through. I’ll see if I get a delivery notice.

This is what I received back after I tried it last night. Maybe this makes sense to you…


Unable to deliver message after multiple retries, giving up.

— Below this line is a copy of the message.

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=s2048; t=1594874005; bh=agFfIn/R+bZ7fSzGPT0cfueC/9Xl150c/flOjzMVP2o=; h=Date:From:To:In-Reply-To:References:Subject:From:Subject; b=X2OCyagGwh9Wv0gSb5XNzwBQNi1z+9LXEjKhlB8qFGyKFcgwYCed2s1qFtqj/OW088ZNGCGdd+J9djyKg7G3WvRf3bLU+XQaNFaqYBZ7A0YicCbk7Hx7MFtVvfzKvfZZ7x0KDMEm0uySHmIld62nwlqux2Ru6FYkpBbBL9ig/I19CgorTOv94ejbjSGs6TSDxEBg+b9JGWkErZAk3abWVt3uJ03O/O6Wu/E+HkpSgSoSo6YvxEmRHX+/4wgk01+/tgKUNP2Q++hOUvOq2J62LNUUfEYIa2me0ExBLy3c48g3Qo+TxVRPm/w9G+PbFJ6mVxNKSZI3n6DPU5bUKEo8PQ==

X-YMail-OSG: .neFgs4VM1l07VgoRBwtKy.a6xrLy0iZ03PMuFs_LXlziOqAP0LPb3E9e1kCRFJ



















Received: from by with HTTP; Thu, 16 Jul 2020 04:33:25 +0000

Date: Thu, 16 Jul 2020 01:31:23 +0000 (UTC)

From: Daniel Lewis <>

To: <>

Message-ID: <>

In-Reply-To: <>

References: <>

Subject: Re: test postfix

MIME-Version: 1.0

Content-Type: multipart/alternative;


X-Mailer: WebService/1.1.16271 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Content-Length: 1201


Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: 7bit

Give it a few minutes. Maybe more. DNS doesn’t update instantly.

I just sent you a message from my Fastmail account. If it bounces I’ll look at the bounce message.

I really don’t know much about Hover’s DNS, so don’t take anything I say as gospel. I usually run my own DNS.


I do get ping respones from


and haven’t gotten a bounce on the mail yet.


Kill the CNAME record and point to

It should all work after DNS has propagated.

1 Like

Maybe I should set that up here too. Isn’t it incorporated somewhere in virtualmin?

Here is what I have now…

I happened to think though… I’m running more than one domain on this computer. How will it know to send the mail to workbooksonline rather than to the other domain?


Do you happen to have port 25 closed in your firewall? It times out when I try to connect by telnet.


By the addressee ( rcpt to: ).


[root@server1 ~]# dig -t MX

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-16.P2.el7_8.6 <<>> -t MX
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45541
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 512
;           IN      MX

;; ANSWER SECTION:    214     IN      MX      10

;; Query time: 16 msec
;; WHEN: Thu Jul 16 22:46:15 EDT 2020
;; MSG SIZE  rcvd: 76

[root@server1 ~]# telnet 25
telnet: connect to address Connection timed out
[root@server1 ~]#

I just opened up port 25 and connected it to this server. I had it directed elsewhere

Have the DNS set up the way you had asked and I directed port 25 to the correct server and it seems to work!

I think that does it!!!

You have no idea how grateful I am!!!


1 Like