Can't Receive outcoming emails in webmin (MX Record is not Properly configured)

15 posts / 0 new
Last post
#1 Mon, 10/26/2015 - 02:47
anonymox

Can't Receive outcoming emails in webmin (MX Record is not Properly configured)

Hi guys I have a webmin installed on ubuntu server and I configured it from official website to have a mailserver. I can send outgoing emails for example to yahoo or gmail accounts but I can't receive email from outside. I have created a virtual server for my mail server and named it like my domain name, and then i created a bind zone and in there configured A records and nameservers and mail server records.

when i send an email from gmail to my mailserver i get this error message :

" This is an automatically generated Delivery Status Notification
THIS IS A WARNING MESSAGE ONLY.
YOU DO NOT NEED TO RESEND YOUR MESSAGE.
Delivery to the following recipient has been delayed:
     info@mydomain.com
Message will be retried for 2 more day(s)
Technical details of temporary failure:
DNS Error: MX lookup of mydomain.com returned error DNS server returned general failure "

when i look up my domain in intodns.com everything is ok but the only problem is MX record and it shows this message :

"Oh well, I did not detect any MX records so you probably don't have any and if you know you should have then they may be missing at your nameservers! "

FYI :

for example myvirtual server is like : mydomain.com

my domain name is like : mydomain.com

virtual server user is : info

my A record is like : mydomain.com in A external_ip_address

and : mail.modomain.com in A external_ip_address

my mail server record is : mail.mydomain.com with priority : 10

I don't know what else to do to make it work help please.

Mon, 10/26/2015 - 07:24
Diabolico
Diabolico's picture

Its hard to see what is wrong from your post, it would be nice if you could post your entire DNS for that domain. Use < code> tags or something like pastebin.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Mon, 10/26/2015 - 07:45
anonymox

thanks for response

my real domain name is : karshenasan-nezam.com if you need more information just let me know.

Mon, 10/26/2015 - 10:23
andreychek

Howdy,

Are the nameservers for your domain correct?

They appear to be set to:

darya1.irandns.com
darya2.irandns.com

That appears to be your provider, rather than your Virtualmin server.

That's okay, but you'd just want to make sure your DNS records are setup the way you want there.

Now, things should actually work without an MX record, it should revert to using the 'A' record for delivering email... that said, it wouldn't hurt to setup an MX record where ever your nameservers are pointed.

-Eric

Mon, 10/26/2015 - 11:20
anonymox

howdy

thanks andreychek for reply

the name servers of my domain are those two that you posted,

do you suggest to remove mx record to see if i get email from outside ?

i also defined ns1.karshenasan-nezam.com with my external ip and also ns2.karshenasan-nezam.com

in A records to see if it work or not but it didn't work.

Mon, 10/26/2015 - 12:15
andreychek

Howdy,

Well, there doesn't appear to be an MX record. That's the error you were receiving above, and when I look myself I don't see one.

So I'm actually suggesting you add one to the listed nameservers.

-Eric

Tue, 10/27/2015 - 04:22
anonymox

Hi again andreychek actually there is a mx record as I said in the first post . and it's :

@ in mx 10 mail.karshenasan-nezam.com

FYI : i've tried all types for mx record like :

karshenasan-nezam.com in mx 10 mail.karshenasan-nezam.com

OR

mail.karshenasan-nezam.com in mx 10 mail.karshenasan-nezam.com

but none of them worked. any suggestion ?

for make it more clear for you I put screen shots from my webmin panel

Tue, 10/27/2015 - 05:26
Diabolico
Diabolico's picture

anonymox can you go Virtualmin -> Virtual server (probably "karshenasan-nezam.com") -> Server configuration -> DNS records -> click "Manually edit records" and copy here entire zone. Another option is to use SSH or SFTP and go where you have zone files and do the same.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Tue, 10/27/2015 - 06:49
anonymox

howdy this is my entire records I have :

$ttl 38400
karshenasan-nezam.com. IN SOA karshenasan-nezam.com. info.mail.karshenasan-nezam.com. (
1444481938
10800
3600
604800
38400 )
karshenasan-nezam.com. IN NS darya1.irandns.com.
karshenasan-nezam.com. IN NS darya2.irandns.com.
karshenasan-nezam.com. IN A 128.65.188.13
www.karshenasan-nezam.com. IN A 128.65.188.13
ftp.karshenasan-nezam.com. IN A 128.65.188.13
m.karshenasan-nezam.com. IN A 128.65.188.13
www.karshenasan-nezam.com. IN A 128.65.188.13
localhost.karshenasan-nezam.com. IN A 127.0.0.1
webmail.karshenasan-nezam.com. IN A 128.65.188.13
admin.karshenasan-nezam.com. IN A 128.65.188.13
mail.karshenasan-nezam.com. IN A 128.65.188.13
karshenasan-nezam.com. IN MX 5 mail.karshenasan-nezam.com.
autoconfig.karshenasan-nezam.com. IN A 128.65.188.13

I have copied this records from webmin > servers > bind dns servers > karshenasan-nezam.com > edit records file which is located in : /var/lib/bind/karshenasan-nezam.com.hosts

Tue, 10/27/2015 - 10:54
andreychek

Well, just to verify -- is "darya1.irandns.com" your Virtualmin server?

I don't believe that's the case, and that may be the issue here... even though you're seeing an MX record that Virtualmin is creating for you, that's not likely what's acting as your nameserver.

You would need to add the MX record to whatever provider is hosting your DNS, not your Virtualmin server.

-Eric

Wed, 10/28/2015 - 04:47 (Reply to #10)
anonymox

thanks andreychek for reply

actually darya1.irandns.com is DNS server of my "karshenasan-nezam.com" domain, so it's not virtualmin server !

let me make it clear for you : i have an ubuntu server which my website is on it, i needed a mailserver so i installed postfix and dovecot ,etc... manually then i installed webmin and virtualmin plugin, then i created a virtual server named after my domain name, i mean my virtual server and my domain name are the same : "karshenasan-nezam.com" after i created my virtual server in virtualmin i created and configured a mail user for it, and for outgoing and outcoming email i configured my bind server (i mean a records and mx records) like above, but it's not working.

do you suggest that i add those records manually to my ubuntu server instead of virtual server ? FYI : this is the content of "/var/lib/bind/karshenasan-nezam.com.hosts" file

$ttl 38400
karshenasan-nezam.com.  IN      SOA     karshenasan-nezam.com. info.karshenasan-nezam.com. (
                        1444481939
                        10800
                        3600
                        604800
                        38400 )
karshenasan-nezam.com.  IN      NS      darya1.irandns.com.
karshenasan-nezam.com.  IN      NS      darya2.irandns.com.
karshenasan-nezam.com.  IN      A       128.65.188.13
www.karshenasan-nezam.com.      IN      A       128.65.188.13
ftp.karshenasan-nezam.com.      IN      A       128.65.188.13
m.karshenasan-nezam.com.        IN      A       128.65.188.13
www.karshenasan-nezam.com.      IN      A       128.65.188.13
localhost.karshenasan-nezam.com.        IN      A       127.0.0.1
webmail.karshenasan-nezam.com.  IN      A       128.65.188.13
admin.karshenasan-nezam.com.    IN      A       128.65.188.13
mail.karshenasan-nezam.com.     IN      A       128.65.188.13
karshenasan-nezam.com.  IN      MX      5 mail.karshenasan-nezam.com.
autoconfig.karshenasan-nezam.com.       IN      A       128.65.188.13

Thanks in advance

Wed, 10/28/2015 - 10:04
anonymox

guys please help me out here, i'm stuck and I have to make it work.

Wed, 10/28/2015 - 10:12
andreychek

As I shared above, your DNS for karshenasan-nezam.com is being hosted at darya1.irandns.com.

So it doesn't matter what DNS records you add at your Virtualmin server, those are not being used.

Only the DNS records at darya1.irandns.com are being used when performing a DNS lookup of karshenasan-nezam.com.

So if you want an MX record for your domain, you would need to add it at darya1.irandns.com.

-Eric

Wed, 10/28/2015 - 11:13 (Reply to #13)
anonymox

you mean i contact my dns provider and tell them to set this record for me ?

Wed, 10/28/2015 - 12:09
andreychek

I don't know enough about your setup there to know where this change needs to be made. All I can offer is that whatever darya1.irandns.com is -- that's where the MX record needs to go.

-Eric

Topic locked