Setting up rDNS

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
hallelujah
New user
New user
Posts: 6
Joined: 2020-02-14 01:16
Location: Gold Coast, Australia

Setting up rDNS

Post by hallelujah » 2020-02-29 02:04

Hi, I am using HmailServer v5.6.7-B2425 for multiple domains under a single IP address and have an rDNS question.

Lets say my IP address is 121.30.8.111 and I have domains business1.com and business2.com. The mail servers are mail.business1.com and mail.business2.com.

I have setup the DNS for each domain respectively as follows:-

A mail 121.30.8.111
MX @ mail.business1.com

and
A mail 121.30.8.111
MX @ mail.business2.com

I did a rDNS check on my IP address and received something like:-
111.8.30.121.in-addr.arpa. 299 IN PTR user.dsl.network.net.

My ISP is Network.net. I understand I can ask them to change the PTR to mail.business1.com - correct? But how does that help me with mail.business2.com?

I would rather leave my ISP out of it, if possible.

Is it possible to resolve this by changing HmailServer->Settings->Protocols->SMTP->Delivery of Email->Local Host Name, to "user.dsl.network.net"?

Is there anything else I would need to setup (e.g. a PTR in the DNS for business1.com and business2.com)?

Appreciate your feedback.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8527
Joined: 2011-09-08 17:48

Re: Setting up rDNS

Post by jimimaseye » 2020-02-29 02:24

Do like Google does. Have an independant smtp server irrespective of the domain names and set it as the mx for all domains. (Google suite domains all point to google.com servers for sending).

Eg set your host to be 'excelmail.yours.com' and set all the mx records for all domains to point to it. Then get your ptr set to point to it to.

If you really don't want to bother with your isp then modify the mx records to point to user.dsl.network.net . However, i wouldn't bother. I never had a rejection based purely on the ptr record not matching the host. (No ptr is a problem, yes, but not matching is not - not in the real world anyway).

[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

hallelujah
New user
New user
Posts: 6
Joined: 2020-02-14 01:16
Location: Gold Coast, Australia

Re: Setting up rDNS

Post by hallelujah » 2020-02-29 03:25

Hi jimimaseye, thanks for the response. I don't want to bother with my isp right now, so if I change the mx records to point to user.dsl.network.net - mail will continue to work and solve the rDNS issue?

With regards to "I never had a rejection based purely on the ptr record not matching the host", my issue is that Yahoo keeps flagging my emails as "Bulk" even though I'm not sending bulk emails and I have setup everything else (e.g. DKIM, SPF etc). This is my last guess where the problem lies. It is a big issue for me because if my customer has a yahoo account, my emails go into Junk and POP3 does not download these so they think they never arrive. (I tried to get Yahoo to help, but nothing came of it).

If I do contact the isp and ask it point to say 'excelmail.yours.com' and setup this mail server, can I still send/receive emails etc from say Peter@business1.com and Michael@business2.com? Or does everyone need to be @excelmail.yours.com??

Brucedg
New user
New user
Posts: 1
Joined: 2020-02-29 03:55

Re: Setting up rDNS

Post by Brucedg » 2020-02-29 03:55

Cool , thanks :)

palinka
Senior user
Senior user
Posts: 1916
Joined: 2017-09-12 17:57

Re: Setting up rDNS

Post by palinka » 2020-02-29 15:13

hallelujah wrote:
2020-02-29 03:25

If I do contact the isp and ask it point to say 'excelmail.yours.com' and setup this mail server, can I still send/receive emails etc from say Peter@business1.com and Michael@business2.com? Or does everyone need to be @excelmail.yours.com??
Create (or use existing) domain as your mail server host domain. Eg excelmail.yours.com

excelmail.yours.com A=1.2.3.4 (your mail server ip)
excelmail.yours.com MX=excelmail.yours.com
Ask your ISP to make 1.2.3.4 PTR=excelmail.yours.com
hmailserver smtp banner = excelmail.yours.com

business1.com MX=excelmail.yours.com
business2.com MX=excelmail.yours.com
otherdomain.com MX=excelmail.yours.com

Now all domains can receive mail at excelmail.yours.com and all mail sent from your server has valid PTR and your smtp banner matches your PTR. That should go a long way toward getting Yahoo to believe you're a real mail server.

User avatar
mattg
Moderator
Moderator
Posts: 20791
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Setting up rDNS

Post by mattg » 2020-02-29 23:05

And all of this is what Office365 and gmail etc do with their hosted domains
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

hallelujah
New user
New user
Posts: 6
Joined: 2020-02-14 01:16
Location: Gold Coast, Australia

Re: Setting up rDNS

Post by hallelujah » 2020-03-12 02:13

I created a website from a spare domain and setup the DNS like normal (e.g. mail, MX, spf, dkim, dmarc etc). Using your example, called it "yours.com". The MX record was "excelmail.yours.com", this is normally what i would do anyway.
I created a new domain in hmailserver for "yours.com" with dkim etc - just like normal.
I changed HmailServer->Settings->Protocols->SMTP->Delivery of Email->Local Host Name, to "excelmail.yours.com"
I then changed the MX record in the DNS for business1.com from "mail.business1.com" to "excelmail.yours.com" as you suggested.
The ISP changed the rDNS to "excelmail.yours.com" - no hassles here at all.
I changed nothing in outlook e.g. same settings and incoming and outgoing service is "mail.business1.com".
I sent an email and received an email from another Hmailserver domain and it all worked!!!
Thanks for your help on this.

I appreciate it works but I am confused, I hope you can explain it for me. If say "fred@yahoo.com" sends email to "Peter@business1.com" how does it end up at mail.business1.com if the business1.com DNS has a MX record as "excelmail.yours.com"? What is the path taken? And vice versa sending email?

I hope this question is ok on the same thread.

palinka
Senior user
Senior user
Posts: 1916
Joined: 2017-09-12 17:57

Re: Setting up rDNS

Post by palinka » 2020-03-12 03:16

hallelujah wrote:
2020-03-12 02:13
I created a website from a spare domain and setup the DNS like normal (e.g. mail, MX, spf, dkim, dmarc etc). Using your example, called it "yours.com". The MX record was "excelmail.yours.com", this is normally what i would do anyway.
I created a new domain in hmailserver for "yours.com" with dkim etc - just like normal.
I changed HmailServer->Settings->Protocols->SMTP->Delivery of Email->Local Host Name, to "excelmail.yours.com"
I then changed the MX record in the DNS for business1.com from "mail.business1.com" to "excelmail.yours.com" as you suggested.
The ISP changed the rDNS to "excelmail.yours.com" - no hassles here at all.
I changed nothing in outlook e.g. same settings and incoming and outgoing service is "mail.business1.com".
I sent an email and received an email from another Hmailserver domain and it all worked!!!
Thanks for your help on this.

I appreciate it works but I am confused, I hope you can explain it for me. If say "fred@yahoo.com" sends email to "Peter@business1.com" how does it end up at mail.business1.com if the business1.com DNS has a MX record as "excelmail.yours.com"? What is the path taken? And vice versa sending email?

I hope this question is ok on the same thread.
Outlook doesn't care about names - only IPs. We know that mail.business1.com had an mx record that pointed to your hmailserver. Therefore it also had an A record pointing to the same IP. Outlook resolves the A to get the IP, then connects. I'm not 100% certain about what outlook resolves, but I'm very certain that it doesn't care as long as it ends up landing on an IP/port that will give it a successful response - which of course, includes authentication.

Sending mail is the same. Outlook doesn't send mail. It connects to a mail server for relaying. Outlook doesn't care about MX - only hmailserver does. All outlook cares about is finding your hmailserver.

User avatar
mattg
Moderator
Moderator
Posts: 20791
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Setting up rDNS

Post by mattg » 2020-03-12 04:00

If you have certificate for StartTLS (optional) on port 25, or for your other client connection ports, that should also match your RNDS.

That is sometimes checked
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

hallelujah
New user
New user
Posts: 6
Joined: 2020-02-14 01:16
Location: Gold Coast, Australia

Re: Setting up rDNS

Post by hallelujah » 2020-03-12 04:56

Thanks Palinka, I think I know what you mean. Since the DNS for "mail.business1.com" has an "A MAIL" entry to an IP address, Outlook can easily resolve the name to an IP address, then connects to the IP/port with the login and password. Hmailserver sees the login as "Peter@business1.com" so knows it is the business1.com domain to use (and user Peter). Makes sense. To test this, I changed outlook settings from "mail.business1.com" to its IP address and the test mail worked. Receiving email from "fred@yahoo.com", I guess yahoo resolves the URL from the DNS MX record which is "excelmail.yours.com" goes to that URL (not IP address) and port, Hmailserver connects and recognises the email address ("Peter@business1.com") so puts it under the corresponding user in that domain (otherwise fails). Thanks for clarifying.

Hi Mattg, I have not setup StartTLS, I want to use SSL for POP3 and SMTP. What certificate/s do I need to create? Do I need to create one for each domain (e.g. "business1.com" and "business2.com") or can I get away with just one for all domains e.g. "excelmail.yours.com" without getting a certificate warning for each Outlook domain? Do I need StartTLS, I didn't really understand why when I will have SSL.

User avatar
mattg
Moderator
Moderator
Posts: 20791
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Setting up rDNS

Post by mattg » 2020-03-12 05:38

You need ONE to match your RDNS / Server name

Some good tutorials on this forum, like this one >> https://www.hmailserver.com/forum/viewt ... 21&t=32593
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply