LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-25-2020, 05:39 AM   #16
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103

While I agree with most of what scasey says, I don't agree with his view on the PTR. The PTR should reflect your domain. Of course that e-mails could get through nonetheless, because usually e-mail servers do not make decisions based only on one criterion, usually they work with weights and after a certain point they consider an e-mail suspicious and it gets greylisted or rejected. You can get e-mails through also if you don't have an SPF record, but that doesn't mean you shouldn't.

Check this out:
http://social.dnsmadeeasy.com/blog/d...ail-marketing/
Quote:
Mail servers use reverse DNS to perform simple anti-spam checks. We like to call this a “three-way handshake”, because mail servers will make sure the forward DNS lookup matches the reverse DNS lookup which matches the fully qualified domain name (FQDN) of the email header.
Or even better, mxtoolbox, probably the best known site where you can check if your e-mail server settings are valid:
https://mxtoolbox.com/problem/smtp/s...dns-resolution
Quote:
When a sending server makes a connection to the recipient server, the recipient server notes the sending IP address and performs a reverse lookup, called a PTR lookup, named after the type of DNS record used. If the result of the reverse lookup matches the result of a forward DNS Lookup, then it's much more likely that the message is legitimate. If the IP address doesn't match, it's much more likely that the sending address was spoofed and therefore much more likely that it's unwanted and could be considered spam.

Last edited by vincix; 04-25-2020 at 06:02 AM.
 
1 members found this post helpful.
Old 04-25-2020, 10:15 AM   #17
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
vincix,
Your analysis is correct, if a mail server checks rDNS, it compares the IP address of the connecting server to the IP address returned by the rDNS check. It does not care, however, what the domain name on the PTR record is and doesn't check that at all.

As the OPs IP has an rDNS, there is no problem for them to solve, and no need to ask their ISP to change the domain on the PTR record, as stated.

Putting their domain into the mxtoolbox site will show that all is well, I expect. That's a good tool to share.

Last edited by scasey; 04-25-2020 at 10:17 AM.
 
1 members found this post helpful.
Old 05-01-2020, 11:12 AM   #18
usodiario
Member
 
Registered: Jan 2020
Posts: 41

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by scasey View Post
vincix,
Your analysis is correct, if a mail server checks rDNS, it compares the IP address of the connecting server to the IP address returned by the rDNS check. It does not care, however, what the domain name on the PTR record is and doesn't check that at all.

As the OPs IP has an rDNS, there is no problem for them to solve, and no need to ask their ISP to change the domain on the PTR record, as stated.

Putting their domain into the mxtoolbox site will show that all is well, I expect. That's a good tool to share.
After installing everything I usually have the following data from mxtoolbox, mecsa and mail-tester on rDNS.

Although it looks good overall, rDNS shows up as a problem.

I did tests sending mail to friends, they reach the spam folder and some do not receive them.

I suppose I will ask the IP provider for a solution, but before doing this I don't know if there is another option?

Thanks for the help
Attached Thumbnails
Click image for larger version

Name:	MXtool.png
Views:	20
Size:	112.9 KB
ID:	33137   Click image for larger version

Name:	mec.png
Views:	25
Size:	134.5 KB
ID:	33138   Click image for larger version

Name:	mailtest.png
Views:	20
Size:	113.1 KB
ID:	33139  
 
Old 05-01-2020, 06:12 PM   #19
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Interesting.
I have one rDNS referencing one domain. All mail to any domains I host hit that domain's mail server. In my case the SMTP banner does match the rDNS (both say mail.mydomain.com), so I get a green check mark and a warning that the banner/rDNS is different from the domain in the MX record.

Since you have a static IP, you should probably request that the rDNS reflect the same domain as your mail server.
(and perhaps I should update the MX records to reflect the actual domain name the server is using)
 
1 members found this post helpful.
Old 05-04-2020, 12:03 PM   #20
usodiario
Member
 
Registered: Jan 2020
Posts: 41

Original Poster
Rep: Reputation: 0
It is true that one of the main requirements for a mail server is the correct configuration of the rDNS to prevent our mail from reaching SPAM.

The truth is that I am not worried that it will reach SPAM because the people who receive it know that I am going to send it, but I am concerned that the mail will not arrive.

I've been trying to understand how DANE and DNSSEC work for several days, maybe it works to improve the delivery of emails
 
Old 05-08-2020, 03:20 AM   #21
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by scasey View Post
Interesting.
I have one rDNS referencing one domain. All mail to any domains I host hit that domain's mail server. In my case the SMTP banner does match the rDNS (both say mail.mydomain.com), so I get a green check mark and a warning that the banner/rDNS is different from the domain in the MX record.

Since you have a static IP, you should probably request that the rDNS reflect the same domain as your mail server.
(and perhaps I should update the MX records to reflect the actual domain name the server is using)

So you mean to reflect, let's say, mailrelay.domain.com, instead of domain.com, right?
 
Old 05-08-2020, 12:26 PM   #22
usodiario
Member
 
Registered: Jan 2020
Posts: 41

Original Poster
Rep: Reputation: 0
I think I missed this again.

mydomain.com: Domain name, not the server subdomain
mail.mydomain.com: Mail server subdomain name (hostname -f)
ht.northwestel.net: Internet provider name, the same one that gives me the static public IP.

At the server level will I have to add ht.northwestel.net somewhere?

Or should I play MX Records by adding ht.northwestel.net.?

Or is it better to talk to the provider to make changes to mail.mydomain.com?


Cheers
 
Old 05-08-2020, 12:45 PM   #23
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
A good premise (at least this worked for me when I eventually wanted to understand the difference) is to realise that the e-mail server's domain name can be anything. It doesn't have to be mail.mydomain.com, it can be whateveryouwant.anotherdomain.com. As long as it is allowed (through SPF, DKIM, DMARC whatever + the right rDNS) to send e-mail, that's fine.


This ht.northwestel.net you don't need to use anywhere.
Quote:
Or should I play MX Records by adding ht.northwestel.net.?
Or is it better to talk to the provider to make changes to mail.mydomain.com?
If you want to change your rDNS you need to talk to your provider anyway. I don't understand exactly what you mean by "play". In any case, I still think that the standard way of doing this is to talk to your provider and ask them to change your rDNS to mail.mydomain.com, so that the ip of your e-mail server is resolved to "mail.mydomain.com".

If they refuse (I'm not sure if they are in any way bound by this), then I suppose you could change your smtp banner to that of the name given by your ISP. (I guess this is what you were referring to in the first question?) A compromise which kind of sucks, to my mind, but it would work, as far as I can tell
 
1 members found this post helpful.
Old 05-08-2020, 02:15 PM   #24
usodiario
Member
 
Registered: Jan 2020
Posts: 41

Original Poster
Rep: Reputation: 0
I did the test with smtp_banner:

nano /etc/postfix/main.cf

smtpd_banner = $ d200-100-40-30.yt.northwestel.net ESMTP $ mail_name (Raspbian)

And now they greet each other well, the error shown in mxtoolbox is no longer there.
In mail-tester it stays the same with the rDNS error.

I don't know how this change could affect the rest, but I'll be aware.


Greetings and thanks
 
  


Reply

Tags
lamp, postfix, ptr, raspbian, rdns



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Steps to take after my ISP added custom rDNS (PTR) record for an IP address that I use for my Postfix mail server grigory Linux - Server 1 06-29-2017 03:03 PM
[SOLVED] Struct pointer *ptr = *ptr ? errigour Programming 11 02-13-2014 03:39 AM
[SOLVED] container_of:why not "const typeof(*ptr) *__mptr=(ptr);" songcaidao Linux - Kernel 6 10-26-2013 08:35 AM
Qmail relaying. 421 Refused. You have no reverse DNS entry. UPDATE: Spamdyke, bypass rdns by ip? seismicmike Linux - Server 1 12-06-2012 07:52 AM
[SOLVED] Pointer arithmetic question : *ptr++ or (*ptr)++ theKbStockpiler Programming 8 06-02-2010 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration