Receiving domain only hase MX records and no A records.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Receiving domain only hase MX records and no A records.

P.V.Anthony
Hi,

Postfix is giving the following error message.

-------- start ---------------
Host or domain name not found. Name
     service error for name=schools.gov.sg type=AAAA: Host found but no data
     record of requested type
-------- end -----------------

schools.gov.sg has MX records but no A or AAAA records.

Postfix is not allowing to send emails to schools.gov.sg.

What configuration should be done to make postfix send emails to
schools.gov.sg?

Is A or AAAA records needed for a domain to receive emails? Would just
MX records be enough?

--
P.V.Anthony

Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

ahsan2011
You should be able to send emails to MX records , A records are not needed.

On Wed, 18 Nov 2020 at 10:28 AM, P.V.Anthony <[hidden email]> wrote:
Hi,

Postfix is giving the following error message.

-------- start ---------------
Host or domain name not found. Name
     service error for name=schools.gov.sg type=AAAA: Host found but no data
     record of requested type
-------- end -----------------

schools.gov.sg has MX records but no A or AAAA records.

Postfix is not allowing to send emails to schools.gov.sg.

What configuration should be done to make postfix send emails to
schools.gov.sg?

Is A or AAAA records needed for a domain to receive emails? Would just
MX records be enough?

--
P.V.Anthony

--
Regards
Ahsan


Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

ahsan2011
Does the Postfix server able to query the MX records

On Wed, 18 Nov 2020 at 10:34 AM, Ahsan Khan <[hidden email]> wrote:
You should be able to send emails to MX records , A records are not needed.

On Wed, 18 Nov 2020 at 10:28 AM, P.V.Anthony <[hidden email]> wrote:
Hi,

Postfix is giving the following error message.

-------- start ---------------
Host or domain name not found. Name
     service error for name=schools.gov.sg type=AAAA: Host found but no data
     record of requested type
-------- end -----------------

schools.gov.sg has MX records but no A or AAAA records.

Postfix is not allowing to send emails to schools.gov.sg.

What configuration should be done to make postfix send emails to
schools.gov.sg?

Is A or AAAA records needed for a domain to receive emails? Would just
MX records be enough?

--
P.V.Anthony

--
Regards
Ahsan


--
Regards
Ahsan


Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

P.V.Anthony
On 18/11/20 13:05, Ahsan Khan wrote:
> Does the Postfix server able to query the MX records

Yes the postfix server can query the MX records. So the dns part in the
server is good.

Is there any other things that I can test?

Or some configuration that needs to be changed?

P.V.Anthony
Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

Viktor Dukhovni
In reply to this post by P.V.Anthony
On Wed, Nov 18, 2020 at 12:58:32PM +0800, P.V.Anthony wrote:

> Postfix is giving the following error message.
>
> -------- start ---------------
> Host or domain name not found. Name
>      service error for name=schools.gov.sg type=AAAA: Host found but no data
>      record of requested type
> -------- end -----------------

This can happen when you disable MX lookups, by e.g. setting the nexthop
domain in the transport table to "[schools.gov.sg]".  It can also happen
if your nameserver is breaking MX lookups, and return erroneous denial
of existence.  [ There's a recent trend to "improve" DNS resolution in
Linux by making it incompatible with prior behaviour and unreliable,
perhaps your system is one of the "improved" versions. ]

> schools.gov.sg has MX records but no A or AAAA records.

    schools.gov.sg. IN MX 10 mail3a.schools.gov.sg. ; NoError
    schools.gov.sg. IN MX 10 mail3b.schools.gov.sg. ; NoError
    schools.gov.sg. IN MX 10 mail4a.schools.gov.sg. ; NoError
    schools.gov.sg. IN MX 10 mail4b.schools.gov.sg. ; NoError
    mail3a.schools.gov.sg. IN A 166.121.176.66 ; NoError
    mail3a.schools.gov.sg. IN AAAA ? ; NODATA
    mail3b.schools.gov.sg. IN A 166.121.176.67 ; NoError
    mail3b.schools.gov.sg. IN AAAA ? ; NODATA
    mail4a.schools.gov.sg. IN A 166.121.177.66 ; NoError
    mail4a.schools.gov.sg. IN AAAA ? ; NODATA
    mail4b.schools.gov.sg. IN A 166.121.177.67 ; NoError
    mail4b.schools.gov.sg. IN AAAA ? ; NODATA

Yes, it has four MX hosts, which have IPv4 addresses, and Postfix
when not misconfigured to bypass MX lookups and not behind a flaky
DNS resolver will by default use these MX hosts with no special
non-default settings.

> Postfix is not allowing to send emails to schools.gov.sg.

No, your configuration or nameserver is doing that, not Postfix.

> What configuration should be done to make postfix send emails to
> schools.gov.sg?

The default configuration.

--
    Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

P.V.Anthony
On 18/11/20 13:25, Viktor Dukhovni wrote:

> Yes, it has four MX hosts, which have IPv4 addresses, and Postfix
> when not misconfigured to bypass MX lookups and not behind a flaky
> DNS resolver will by default use these MX hosts with no special
> non-default settings.
>
>> Postfix is not allowing to send emails to schools.gov.sg.
>
> No, your configuration or nameserver is doing that, not Postfix.
>
>> What configuration should be done to make postfix send emails to
>> schools.gov.sg?
>
> The default configuration.

I will check the DNS resolver and check not to bypass MX lookups.

The advice has put in the right path to check and test. Saved me much
time and effort.

Thank you for the advice. I really do appreciate it.

P.V.Anthony



Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

Matus UHLAR - fantomas
In reply to this post by P.V.Anthony
On 18.11.20 12:58, P.V.Anthony wrote:
>Postfix is giving the following error message.
>
>-------- start ---------------
>Host or domain name not found. Name
>    service error for name=schools.gov.sg type=AAAA: Host found but no data
>    record of requested type
>-------- end -----------------

can you provide a few lines above and below this error message?

>schools.gov.sg has MX records but no A or AAAA records.
>
>Postfix is not allowing to send emails to schools.gov.sg.
>
>What configuration should be done to make postfix send emails to
>schools.gov.sg?
>
>Is A or AAAA records needed for a domain to receive emails? Would just
>MX records be enough?

A is needed for sending mail over ipv4, AAAA is needed for sending mail over
ipv6.
What's your inet_protocols settings?

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I drive way too fast to worry about cholesterol.
Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

Wietse Venema
In reply to this post by P.V.Anthony
P.V.Anthony:

> Hi,
>
> Postfix is giving the following error message.
>
> -------- start ---------------
> Host or domain name not found. Name
>      service error for name=schools.gov.sg type=AAAA: Host found but no data
>      record of requested type
> -------- end -----------------
>
> schools.gov.sg has MX records but no A or AAAA records.
>
> Postfix is not allowing to send emails to schools.gov.sg.

Postfix delivers mail to schools.gov.sg just fine, as demonstrated with
"sendmail -bv [hidden email]". in the example below
it chose mail4a.schools.gov.sg with IPv4 address 166.121.177.66.

        Wietse

This is the mail system at host spike.porcupine.org.

Enclosed is the mail delivery report that you requested.

                   The mail system

<[hidden email]>: delivery via
    mail4a.schools.gov.sg[166.121.177.66]:25: 250 recipient
    <[hidden email]> ok

--4CblFG4j4SzJrNs.1605708904/spike.porcupine.org
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; spike.porcupine.org
X-Postfix-Queue-ID: 4CblFG4j4SzJrNs
X-Postfix-Sender: rfc822; [hidden email]
Arrival-Date: Wed, 18 Nov 2020 09:14:58 -0500 (EST)

Final-Recipient: rfc822; [hidden email]
Original-Recipient: rfc822;[hidden email]
Action: deliverable
Status: 2.0.0
Remote-MTA: dns; mail4a.schools.gov.sg
Diagnostic-Code: smtp; 250 recipient <[hidden email]> ok

--4CblFG4j4SzJrNs.1605708904/spike.porcupine.org
Content-Description: Message Headers
Content-Type: text/rfc822-headers
Content-Transfer-Encoding: 8bit

Return-Path: <[hidden email]>
Received: by spike.porcupine.org (Postfix, from userid 1001)
        id 4CblFG4j4SzJrNs; Wed, 18 Nov 2020 09:14:58 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=porcupine.org;
        s=dktest; t=1605708898;
        bh=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN/XKdLCPjaYaY=;
        h=From:Subject:To:Message-Id:Date;
        b=TvTPczu7UdgObP3hWO5oCfYspAYki7Rs5ff/We2EqnNQbEfgOR2lARy3jnCv29Hv7
         elWqyzANxpcV43pj4lyMrVPyV48ci9EqwkhCo6W05BwYXa8zH19qdjOiToemhx7LPV
         JwZvK+mKtBChZ5JKcE20tCm9uclVghyMV8RfJvlU=
From: [hidden email]
Subject: probe
To: [hidden email]
Message-Id: <[hidden email]>
Date: Wed, 18 Nov 2020 09:14:58 -0500 (EST)

--4CblFG4j4SzJrNs.1605708904/spike.porcupine.org--

Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

Wietse Venema
Wietse Venema:

> P.V.Anthony:
> > Hi,
> >
> > Postfix is giving the following error message.
> >
> > -------- start ---------------
> > Host or domain name not found. Name
> >      service error for name=schools.gov.sg type=AAAA: Host found but no data
> >      record of requested type
> > -------- end -----------------

As observed by Viktor, Postfix will look up A or AAAA records for
schools.gov.sg if MX lookups are disabled.

Perhaps this:

- Postfix configuration: disable_dns_lookups=yes,

The following were already mentioned.

- Postfix configuration: schools.gov.sg inside [],

- DNS infrastructure that returns NODATA for MX lookups.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Receiving domain only hase MX records and no A records.

P.V.Anthony
On 18/11/20 23:25, Wietse Venema wrote:

> As observed by Viktor, Postfix will look up A or AAAA records for
> schools.gov.sg if MX lookups are disabled.
>
> Perhaps this:
>
> - Postfix configuration: disable_dns_lookups=yes,
>
> The following were already mentioned.
>
> - Postfix configuration: schools.gov.sg inside [],
>
> - DNS infrastructure that returns NODATA for MX lookups.

Thank you to all who have replied and helped. I really do appreciate it.

Here is what was done.

1. Checked through main.cf and master.cf.

2. Could not find any setting that disables MX lookups.

3. Did the dig in the server for MX records for schools.gov.sg and it
returned the MX records without error.

4. Changed the inet_protocols from "all" to "ipv4".

5. sent an email to [hidden email] and it worked!!!

6. Next for testing, added smtp_address_preference = any and set
inet_protocols back to "all".

7. sent an email to [hidden email] and it worked!!!

8. Testing again. Commented out smtp_address_preference = any and back
to the original config when all this problem started.

9. sent an email to [hidden email] and it worked!!!

10. I am happy that it works but not sure why it did not work in the
first place and why it works now.

Once again thank you all for replying and helping. The help has been
really valuable.

P.V.Anthony