Mail Routing Question

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

Mail Routing Question

wa6vvv
I have a domain, say: aaa.com for which I receive mail.  Currently I have A records in DNS for aaa.com and mail.aaa.com as well as a MX record for aaa.com.  All three of them point to the same IP address which is where postfix is running.  There is a political issue with the A record for aaa.com and it "needs" to be changed to elsewhere.  I somehow seem to recall that there are some MTAs that do not use the MX records, but only check the A records.  Will changing the A record for aaa.com cause the loss of some incoming mail?

-- Doug

Reply | Threaded
Open this post in threaded view
|

RE: Mail Routing Question

Kevin Miller
You can point the A record for aaa.com to one IP and the MX record for it to another.

I.e.
aaa IN A 192.168.1.1
     IN MX 10 192.168.1.2

All the MX record does is tell the world what mail host to use for a given domain.  So you may have a web server running on aaa.com but not your email server.  When someone queries aaa.com the A record is normally returned, but if the type is set to MX then the MX record is returned instead.

In the example above, a web page to http://aaa.com would go to 192.168.1.1, whereas an SMTP server would connect to 192.168.1.2.

Be sure that you update the PTR records for the hosts when you change them...

...Kevin
--
Kevin Miller
Network/email Administrator, CBJ MIS Dept.
155 South Seward Street
Juneau, Alaska 99801
Phone: (907) 586-0242, Fax: (907) 586-4588 Registered Linux User No: 307357


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Doug Hardie
Sent: Thursday, November 16, 2017 1:32 PM
To: Postfix users
Subject: Mail Routing Question

I have a domain, say: aaa.com for which I receive mail.  Currently I have A records in DNS for aaa.com and mail.aaa.com as well as a MX record for aaa.com.  All three of them point to the same IP address which is where postfix is running.  There is a political issue with the A record for aaa.com and it "needs" to be changed to elsewhere.  I somehow seem to recall that there are some MTAs that do not use the MX records, but only check the A records.  Will changing the A record for aaa.com cause the loss of some incoming mail?

-- Doug

Reply | Threaded
Open this post in threaded view
|

Re: Mail Routing Question

Viktor Dukhovni
In reply to this post by wa6vvv


> On Nov 16, 2017, at 5:32 PM, Doug Hardie <[hidden email]> wrote:
>
> I have a domain, say: aaa.com for which I receive mail.  Currently I have A records in DNS for aaa.com and mail.aaa.com as well as a MX record for aaa.com.  All three of them point to the same IP address which is where postfix is running.  There is a political issue with the A record for aaa.com and it "needs" to be changed to elsewhere.  I somehow seem to recall that there are some MTAs that do not use the MX records, but only check the A records.

Any MTA that fails to check MX records is badly broken, and can barely
deliver email to any domains that matter (all the big players have
MX hosts separate from their A/AAAA records used primarily for HTTP).

>  Will changing the A record for aaa.com cause the loss of some incoming mail

No.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: Mail Routing Question

Benny Pedersen-2
In reply to this post by wa6vvv
Doug Hardie skrev den 2017-11-16 23:32:
> Will changing the A record for
> aaa.com cause the loss of some incoming mail?

no, if that changed ip accept delivery of that recipient domain

back to what mx does ?, it only defines a seperate hostname to deliver
mail to if mail and other servicefs on hostnamea is not same as service
on hostnameb eq if you only have single ip, do not use mx setup

people are misguided if that say mx is needed to recieve emails, i have
seen fool bounces that i need mx to recieve bounces, where the bounced
text was rejected mail from me since i did inded not have a mx, i dont
need a complex world setup for a single ip
Reply | Threaded
Open this post in threaded view
|

Re: Mail Routing Question

wa6vvv
In reply to this post by Viktor Dukhovni

> On 16 November 2017, at 14:45, Viktor Dukhovni <[hidden email]> wrote:
>
>
>
>> On Nov 16, 2017, at 5:32 PM, Doug Hardie <[hidden email]> wrote:
>>
>> I have a domain, say: aaa.com for which I receive mail.  Currently I have A records in DNS for aaa.com and mail.aaa.com as well as a MX record for aaa.com.  All three of them point to the same IP address which is where postfix is running.  There is a political issue with the A record for aaa.com and it "needs" to be changed to elsewhere.  I somehow seem to recall that there are some MTAs that do not use the MX records, but only check the A records.
>
> Any MTA that fails to check MX records is badly broken, and can barely
> deliver email to any domains that matter (all the big players have
> MX hosts separate from their A/AAAA records used primarily for HTTP).
>
>> Will changing the A record for aaa.com cause the loss of some incoming mail
>
> No.
>
> --
> Viktor.
>

Thanks to all.  I have changed the A record.  
Reply | Threaded
Open this post in threaded view
|

Re: Mail Routing Question

/dev/rob0
In reply to this post by Kevin Miller
On Thu, Nov 16, 2017 at 10:43:16PM +0000, Kevin Miller wrote:
> You can point the A record for aaa.com to one IP and the MX record
> for it to another.

Yes, but not as per your example.

> I.e.
> aaa IN A 192.168.1.1
>      IN MX 10 192.168.1.2

The RDATA for MX is "integer hostname".  In your example the
"192.168.1.2" would be read as a hostname, and noting the lack of
trailing dot, the zone file's current $ORIGIN value would be
appended.

> In the example above, a web page to http://aaa.com would go to
> 192.168.1.1, whereas an SMTP server would connect to 192.168.1.2.

In this example mail would most likely not be deliverable.  The MX
record in DNS would point to a name which probably does not exist.
--
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
Reply | Threaded
Open this post in threaded view
|

RE: Mail Routing Question

Kevin Miller
Good catch.  I was trying to be succinct, but didn't realize that one couldn't use an IP rather than the hostname.  

So the corrected example should be something like this then:

mail IN A 192.168.0.2
aaa IN A 192.168.1.1
        IN MX 10 mail.aaa.com.


...Kevin
--
Kevin Miller
Network/email Administrator, CBJ MIS Dept.
155 South Seward Street
Juneau, Alaska 99801
Phone: (907) 586-0242, Fax: (907) 586-4588 Registered Linux User No: 307357

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of /dev/rob0
Sent: Thursday, November 16, 2017 5:57 PM
To: [hidden email]
Subject: Re: Mail Routing Question

On Thu, Nov 16, 2017 at 10:43:16PM +0000, Kevin Miller wrote:
> You can point the A record for aaa.com to one IP and the MX record for
> it to another.

Yes, but not as per your example.

> I.e.
> aaa IN A 192.168.1.1
>      IN MX 10 192.168.1.2

The RDATA for MX is "integer hostname".  In your example the "192.168.1.2" would be read as a hostname, and noting the lack of trailing dot, the zone file's current $ORIGIN value would be appended.

> In the example above, a web page to http://aaa.com would go to
> 192.168.1.1, whereas an SMTP server would connect to 192.168.1.2.

In this example mail would most likely not be deliverable.  The MX record in DNS would point to a name which probably does not exist.
--
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: