1

Topic: Inbound Email error

==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Centos 6.3
- Related log if you're reporting an issue:
====
Whenever I send out emails from Roundcube webmail, the email is fine and arrives to any service. However if I try to send something to the mail server i get this error from GMAIL

Delivery to the following recipient failed permanently:

     postmaster@XXXXXXXXXX.co.uk

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain xxxxxxxx.co.uk by mx0.123-reg.co.uk. [94.136.40.61].

The error that the other server returned was:
550 This domain is not hosted here

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

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:x-received:date:message-id:subject:from:to
         :content-type;
        bh=dFAhmrGb0Oiz3a7K0C1E35UXdaPadqplHWTZNDhKTzo=;
        b=eCfKiOAmA6/uKBMvJUo5IKoRjmt7ZmqqmvyKQs83kPhReJZbhOUUoKyPeIwybzodle
         bTdZPGUAQvk0k1KsClbUxyRmln47+mJIeEoVOnFkCOk+HeEFqRlS3C4Kw0x74WEpA5aH
         LpJzSY+8KgQGeSLbhJNF0zaE9rx0sRfhRB6g2fateS5fSdJ5ttbSwZmziMm8y6z7lXRx
         0JO4XyhxadNxRI5BlYJBrd0qVZIfFe4m+OanXZNBc1Lc0M9s110VKNQCTzvRUvULmV2M
         a6gJgxqMUtb1aGsUlqOPqXs8O+OOec9r2WI4S8iT3rQvoxyEdhxJSUcrXxr3ZPBmOh5s
         Ua6g==
MIME-Version: 1.0
X-Received: by 10.224.42.18 with SMTP id q18mr4247599qae.44.1366141374063;
Tue, 16 Apr 2013 12:42:54 -0700 (PDT)
Received: by 10.49.29.102 with HTTP; Tue, 16 Apr 2013 12:42:53 -0700 (PDT)
Date: Tue, 16 Apr 2013 20:42:53 +0100
Message-ID: <CAPQdu=v=9Ji-RUUmPkRn-1q5ZDBydac1r72Q5QU8pKw9gM_Tug@mail.gmail.com>
Subject: jhj
From: Hubert XXXXXXX <xxxxxxxxxxx@gmail.com>
To: postmaster@xxxxxxxxxxxx.co.uk
Content-Type: multipart/alternative; boundary=20cf3074d4e85068fd04da7f93ff

hjhj

2

Re: Inbound Email error

If it helps I used this to set up the server : http://www.howtoforge.com/build-a-full- … n-centos-6

3

Re: Inbound Email error

hubertbunio wrote:

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain xxxxxxxx.co.uk by mx0.123-reg.co.uk. [94.136.40.61].
The error that the other server returned was:
550 This domain is not hosted here

Is the IP address same as defined in DNS? Is it your iRedMail server?
Error message "550 This domain is not hosted here" is not generated by Postfix or its policy servers, i don't think this server runs iRedMail.

4

Re: Inbound Email error

it does, i can access the roundcube

5

Re: Inbound Email error

It makes me confused. I just want to repeat my confusion: Error message "550 This domain is not hosted here" is not generated by Postfix or its policy servers, i don't think this server runs iRedMail.

6

Re: Inbound Email error

how do i check? because I did the iredmail installation ...

7

Re: Inbound Email error

Is this your iRedMail server: mx0.123-reg.co.uk [94.136.40.61]? It redirects to mailex.mailcore.me, and it doesn't show IMAP server info:

$ telnet 94.136.40.61 995
Trying 94.136.40.61...
Connected to mailex.mailcore.me.
Escape character is '^]'.

SMTP server is EXIM, not Postfix which should be installed by iRedMail:

$ telnet mx0.123-reg.co.uk 25
Trying 94.136.40.151...
Connected to mx0.123-reg.co.uk.
Escape character is '^]'.
220 mail10.atlas.pipex.net ESMTP Exim 4.71 - "ATLAS SMTP Service" Fri, 19 Apr 2013 06:49:04 +0100

8

Re: Inbound Email error

thats because 123-reg has its own mail servers, not the one i want though. How do i change where it sends to?

9

Re: Inbound Email error

According to the returned message in Gmail:

Google tried to deliver your message, but it was rejected by the server for the recipient domain xxxxxxxx.co.uk by mx0.123-reg.co.uk. [94.136.40.61].

When you sent email from Gmail to postmaster@xxxxxxxxxxxx.co.uk, Gmail contacted mail server mx0.123-reg.co.uk [94.136.40.61]. and its not your mail server. That's the problem.

You should update MX of DNS record to point to your real mail server (iRedMail).

10

Re: Inbound Email error

how do i  do that exactly? because I have tried but to no avail ;(

11

Re: Inbound Email error

HI There

this looks like a DNS related  issues I had not so long ago,

theses are the steps I follow in resolving my issues

firstly request from your ISP/ or where ever you getting your public ip address from that they setup reverse dns lookups on there side

then you need to setup A records on your dns servers to point to that ip address

once that's sorted test to make sure your ip address resolves to the correct FQDN
and that you FQDN resolves to your ip

lastly setup a mx record that will point to your email server (iredMail)

12

Re: Inbound Email error

when you talk about reverse dns lookups do you mean ports?

13

Re: Inbound Email error

Some reading about reverse DNS: http://en.wikipedia.org/wiki/Reverse_DNS_lookup

You can validate your reverse DNS settings like this:

Notice: in the code below I use as example one of mailservers for gmail.com. Replace fa-in-f18.1e100.net with your mailserver name.

# dig fa-in-f18.1e100.net

...look in the result for:

;; ANSWER SECTION:
fa-in-f18.1e100.net.    86323    IN    A    173.194.70.18

then check the reverse IP by:

# dig -x 173.194.70.18

look in the result for:

;; ANSWER SECTION:
18.70.194.173.in-addr.arpa. 86243 IN    PTR    fa-in-f18.1e100.net.

The hostname after PTR should match the one you started with (in this case I started with fa-in-f18.1e100.net and ended with fa-in-f18.1e100.net - so the setup is correct).

14

Re: Inbound Email error

yep i started with the same hostname and ended with the same hostname, im using 3600 In

15

Re: Inbound Email error

however if i use my domain it has a different host at the end and uses different ins
Start In : 86400
End In: 604800

16

Re: Inbound Email error

Check your DNS settings - it has to be wrong OR your IP in behing some sort of firewall which steals the port 25 and redirect it transparently to your IPS?

What's the output of:

# dig -t mx xxxxxxxx.co.uk

It should show something similar to:

;; ANSWER SECTION:
seznam.cz.        300    IN    MX    50 mx50.seznam.cz.

...and the hostname on the right has to be your server running iRedMail

17

Re: Inbound Email error

i get :
;; ANSWER SECTION:
xxxxxxxx.co.uk.      86400   IN      MX      21 xxxxxxxx.co.uk.
Both same hostnames

18

Re: Inbound Email error

hubertbunio wrote:

i get :
;; ANSWER SECTION:
xxxxxxxx.co.uk.      86400   IN      MX      21 xxxxxxxx.co.uk.
Both same hostnames

I would bet on the latter situation I described. Check, if your IP is accessible using port 25 - you can use webbased tool on this site http://mxtoolbox.com/diagnostic.aspx entering your hostname xxxx.co.uk...

In the Session transcript you have to see the iRedMail EHLO message as the first line. It should be something like this:

220 xxxx.co.uk ESMTP Postfix (Debian/GNU)

What do you see in the session transcript?

19 (edited by hubertbunio 2013-04-21 23:34:44)

Re: Inbound Email error

220 server.home ESMTP Postfix [796 ms]
EHLO please-read-policy.mxtoolbox.com
250-server.home
250-PIPELINING
250-SIZE 15728640
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN [780 ms]
MAIL FROM: <supertool@mxtoolbox.com>
250 2.1.0 Ok [780 ms]
RCPT TO: <test@example.com>
554 5.7.1 <test@example.com>: Relay access denied [920 ms]
QUIT

SendSMTPCommand: You hung up on us after we connected. Please whitelist us. (connection lost)

20

Re: Inbound Email error

also i was using the hostname : www.xxxxxxx.co.uk on all the tests

21

Re: Inbound Email error

(xxx) replaced with the actual domain

22 (edited by camel1cz 2013-04-22 18:02:44)

Re: Inbound Email error

There has to be some error in configuration of your domain. I'll describe the whole process and you can the do thru it and verify everything step by step:

Assumptions:
You have iRedMail server running on YOUR_IP
You have registered domain XXX.CO.UK
You use email address YOU@XXX.CO.UK

Now, I understand you cannot receive emails e.g. from gmail to YOU@XX.CO.UK - you get the bouce quoted above.

1) verify you use XX.CO.UK after the @ in your address - it has to perfectly match.

2) verify MX records of your domain - so take everything after the @ in your email address and put it in the following dig call:

# dig -t mx XX.CO.UK

Look for the answer section:

;; ANSWER SECTION:
EXAMPLE.COM.      86400   IN      MX      21 SOMETHING

- you should have only one line in the answer section!
- if SOMETHING is a hostname and not IP address look in additional section for the IP address for it:

;; ADDITIONAL SECTION:
SOMETHING        300    IN    A    IPADDR

Now, IPADDR has to be the YOUR_IP of your iRedMail server - from what you wrote, it's not...

If it still doesn't work, consider publishing the whole email address, you're testing...

23

Re: Inbound Email error

1. on the answer section i have xxxx.co.uk when i do dig -t mx xxxx.co.uk

24

Re: Inbound Email error

2. How do i change the ipaddr in order for it to be the ip of the iredmail server?

25

Re: Inbound Email error

Great, seems we have located the problem...

You need to ask registrar of your domain - usually registrar has some sort of web based administration allowing you to modify your DNS records.