Only send e-mail with iRedMail on Ubuntu

Posted April 4, 2013 13.7k views
I use this tutorial , but I can only send e-mail and I receive only local e-mail. I do not how debug this problem. Can you help me?

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.

Submit an Answer
9 answers
There are a couple of next steps to take.

First is check your MX resolution for the domain that you are sending email to, to ensure it is being routed to your virtual server.

Next is check your maillog to see if that mail is actually hitting your MTA and perhaps being improperly processed there after.
Hello there. I am too having the same issue. Now I know my DNS setting are as stated in the tutorial. You can do a whois on to see.

So I am at a lost. I can send mail to the outside world. But I can not receive any mails from the outside world. Here is a bounded mail message.

-----Message will be retried for 2 more day(s)

Technical details of temporary failure:
DNS Error: Domain name not found

----- Original message -----

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113;
X-Received: by with SMTP id lo7mr20535913wjb.48.1366307976561;
Thu, 18 Apr 2013 10:59:36 -0700 (PDT)
Received: from MySuperAMD ( [])
by with ESMTPS id du2sm32864956wib.0.2013.
(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Thu, 18 Apr 2013 10:59:35 -0700 (PDT)
From: "Peter Whyte G-Mail"
To: "Peter Whyte"
Subject: you gt me?
Date: Thu, 18 Apr 2013 18:59:32 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 15.4.3555.308
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308
X-Antivirus: avast! (VPS 130418-0, 18/04/2013), Outbound message
X-Antivirus-Status: Clean


And here is my RAW BIND


$TTL 7200
@ IN SOA (
1366390521 ; last update: 2013-04-19 16:55:21 UTC
3600 ; refresh
900 ; retry
1209600 ; expire
10800 ; 3 hours ttl

MX 0
@ IN A
@ TXT "v=spf1 ip4:IP_ADDRESS -all"
dkim._domainkey TXT v=DKIM1; p=IGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJfLEu9mhZOi8y4/yC6huETQOprEvX1Pf2sFw+xyiGFR/kTLKttzchQf64FlSbEdFEkF31rSboK4fIbW7kH7FDT77wBRsrjlDA1LEH7QKJWgnihMhFDoBdPsXqPII7Fm38GMOniKT0kD3z1TTbGxF+smShkIefIoOdED/3OAsCawIDAQAB


Any help on this matter would be great. It is the one thing I need.

Hi Peter,

I'm author of iRedMail project, Zhang Huangbin.

The error message is "DNS Error: Domain name not found", that means the mail server cannot find required DNS records of your domain. Usually, mail server will use MX record(s) to connect to your mail server, if no MX record available, A record is used instead.

Please check your DNS records first, and usually ISP will cache DNS records for several hours, you may need to wait for some hours to get modified DNS records active.

P.S. it's better to post iRedMail related issues/questions in iRedMail online support forum:
> but I can only send e-mail and I receive only local e-mail

This may be greylisting. You can check /var/log/mail.log to see if the email actually arrived. If it is in the log, just give sometime to pass the greylisting.
I have same error as raiyu. My dns settings see on this screenshot:
Sorry, I don't know much about mx records and dns settings, so where I do mistake
I'm posting this just because someone might read this in the future.
I was facing the same problem I only could send email but I couldn't receive emails.
The soloution is very simple! Follow this steps:
1. Log in to your Digital Ocean account.
2. Frol the list on the left side choose DNS.
3. Navigate on your preffered domain name and click it.
4. Push Add Record button.
5. Select an MX.
6. Where it says enter hostname wright (don't forget the dot in the end!)
7. Where it says enter priority type 10

That's it!! wait for few minutes and your email is working!!!
@ Viktor,
Thanks for reply and clear instructions. Question remaining for me is:
does this mx record: "" need to be the same as the FQDN of the actual server (or VPS in this case)?
Mine says: whereas mx and other records point to:, all on same IP. Would this cause redmail not receiving mai??
Thanks for answers!
Yes, it should point to your droplet's hostname/PTR record.