1

Topic: subdomain mail receive problem

==== Required information ====
- iRedMail version: 0.8.6
- MySQL
- FreeBSD 10 64bit
====

Hi,
I have 2 main domain, maindomain.com (works well), otherdomain.com (works well) and subdomain.othetdoamin.com (sent works well) but I can't receive mail from some other people (gmail works well).
I think problem is in relay, because, when i sent mail to user@subdomain.othetdomain.com mail is deliver to user@otherdomain.com but not to user@subdomain.otherdomain.com.
From google mail nad my server work well, but some other people not.

Please help me.

Best regards
Michal

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: subdomain mail receive problem

*) Do you have correct A/MX DNS records for domain 'subdomain.otherdomain.com'?
*) Do you assign 'subdomain.otherdomain.com' as alias domain of 'otherdomain.com'?

3

Re: subdomain mail receive problem

ZhangHuangbin wrote:

*) Do you have correct A/MX DNS records for domain 'subdomain.otherdomain.com'?
*) Do you assign 'subdomain.otherdomain.com' as alias domain of 'otherdomain.com'?

I think yes, every works well, just only mail from certain users, exclude gmail and mail from maindomain.com, becase from this users works good.
Hiere is main DNS file for subdomain.otherdomain.com:

$ORIGIN subdomain.otherdomain.com.
$TTL 86400
@ 1D IN SOA @ michal.maindomain.com (
                2014032001
                1200
                1200
                3600000
                86400
)

@       IN      NS      ns2.maindomain.com.
        IN      MX 10   ns2.maindomain.com.

; IP 1.2.3.4 is address maindomain.com
@       IN      A       1.2.3.4
ns2     IN      A       1.2.3.4

; SPF
subdomain.otherdomain.com.      IN      TXT     "v=spfl include:maindomain.com -all"
subdomain.otherdomain.com.      IN      SPF     "v=spfl include:maindomain.com -all"

www     IN      CNAME   subdomain.otherdomain.com.

I tested subdomain.otherdomain.com as alias for otherdomain.com and as separated file.
Now, I  have subdomain.otherdomain.com as separated file.
WWW works well.
When I send mail to user@subdomain.otherdomain.com I have in mailog file:

reject delivery to user@otherdomain.com 

4

Re: subdomain mail receive problem

Amarantus wrote:

When I send mail to user@subdomain.otherdomain.com I have in mailog file:

reject delivery to user@otherdomain.com 

Show us full log related to this test email please, not just the line you think it's enough.

5

Re: subdomain mail receive problem

ZhangHuangbin wrote:
Amarantus wrote:

When I send mail to user@subdomain.otherdomain.com I have in mailog file:

reject delivery to user@otherdomain.com 

Show us full log related to this test email please, not just the line you think it's enough.

Thx for replay.
Today I test again and user@subdomain.otherdomain.com works well from several public mail server and gmail.
I think, problem was in domain intercharge comunication. Gmail and my mail server interchange DNS
information very fast (in dozen seconds), other domain mail server ( with whom I sent testing mail and not work properly) interchange DNS information very slow (I think 48h or longer).

What is best practice in DNS named.conf, for subdomain must be seperate registration, for examle named.conf:

zone "otherdomain.com" {
type master;
file "dynamic/otherdomain.com";
 };
// subdomain 
zone "subdomain.otherdomain.com" {
type master;
file "dynamic/subdomain";
 };

and zone files for subdomain:

$ORIGIN subdomain.otherdomain.com
$TTL 86400
@ 1D IN SOA @ michal.maindomain.com (
                2014032001
                1200
                1200
                3600000
                86400
)

@       IN      NS      ns2.maindomain.com.
        IN      MX 10   ns2.maindomain.com.

@       IN      A       1.2.3.4
ns2     IN      A       1.2.3.4

; SPF
subdomain.otherdomain.com.      IN      TXT     "v=spfl include:maindomain.com -all"
subdomain.otherdomain.com.      IN      SPF     "v=spfl include:maindomain.com -all"

www     IN      CNAME   subdomain.otherdomain.com

or is enough only registration for otherdomain like this named.conf:

zone "otherdomain.com" {
type master;
file "dynamic/otherdomain.com";
 };

and zone alias for subdomain in otherdomain.com

$ORIGIN otherdomain.com
$TTL 86400
@ 1D IN SOA @ michal.maindomain.com (
                2014032001
                1200
                1200
                3600000
                86400
)

@       IN      NS      ns2.maindomain.com.
        IN      MX 10   ns2.maindomain.com.

@       IN      A       1.2.3.4
ns2     IN      A       1.2.3.4

; SPF
otherdomain.com.      IN      TXT     "v=spfl include:maindomain.com -all"
otherdomain.com.      IN      SPF     "v=spfl include:maindomain.com -all"

www     IN      CNAME   otherdomain.com
subdomain    IN CNAME otherdomain.com
www.subdomain    IN CNAME otherdomain.com

Apache vhost works well in both cases.

6

Re: subdomain mail receive problem

I think your named config is ok. Maybe some servers cache the DNS queries for a longer time.

7

Re: subdomain mail receive problem

ZhangHuangbin wrote:

I think your named config is ok. Maybe some servers cache the DNS queries for a longer time.

Ok,
but I must adding to named.conf next subdomain for domain otherdomain.com or not ?
Is it enough to sign in named.conf only for otherdomain.com without subdomain, nextsubdomain etc ?

8

Re: subdomain mail receive problem

I just found this one in your zone file:

        IN      MX 10   ns2.maindomain.com.

Looks like you point your mail server of 'otherdomain.com' to 'ns2.maildomain.com'.

9

Re: subdomain mail receive problem

Thx for answer.

When I want buy RapidSSL certyficate for my email server I must sign maindomain.com or name of email server ns2.maindomain.com?
From web login to email is: https://maindomain.com/mail, from email client (for example: Thunderbird) is ns2.maindomain.com.

10

Re: subdomain mail receive problem

Amarantus wrote:

When I want buy RapidSSL certyficate for my email server I must sign maindomain.com or name of email server ns2.maindomain.com?

It's better to ask your SSL certificate provider.

11

Re: subdomain mail receive problem

ZhangHuangbin wrote:
Amarantus wrote:

When I want buy RapidSSL certyficate for my email server I must sign maindomain.com or name of email server ns2.maindomain.com?

It's better to ask your SSL certificate provider.

Ok, thanks for all.

Best regards
Michal