Change mail server domain in all sent email headers

Hi there,
I was testing emails and suddenly I noticed that the email header has the domain which is the CyberPanel hostname (I have changed and removed the default port by editing the httpd_config file.).

I even edited the postfix > main.cf file and added the VPS hostname. I have configured the DNS properly. I have added the PTR records(IPv4 & IPv6). I did everything I know.

Now I need your help to remove that marked URL which is the login URL for CyberPanel where I don’t need to type the port number.

Hostname: server.usahive.net
CyberPanel: backend.ushv.xyz

Screenshot:


Thank you!

Hello @engrrajonahmed

You cannot hide the reverse DNS entry for your IP address. This is not something you should be trying to do.

If you want to change the rDNS entry go to your respective service provider and change the ptr record to your mailserver domain name e.g. mail.ushv.xyz

Hi @josephgodwinke ,
Thanks for such a quick reply.

I am not trying to hide rDNS entry for my IP.
I am trying to display that rDNS entry in my emails sent from my VPS.

VPS Hostname: server.usahive.net
VPS rDNS record: server.usahive.net
CyberPanel Login URL: backend.ushv.xyz [I removed the port number by following the tutorial provided by Mr. Usman.].

But the email header is showing the URL which I use to log in to CyberPanel.

Thank you!

Unless you change your mailserver domain to server.usahive.net by changing mx records and setting ssl for this domain. However you cannot have mailserver domain as panel domain too.

Note: the rDNS should be the mailserver domain not panel domain

Panel domain means which I use to log in CyberPanel or VPS hostname?

Yes. Do not use this as your mailserver domain.

Haha, brother I am not using that(backend.ushv.xyz) as the hostname(server.usahive.net) or rDNS record(server.usahive.net).

I get it.

I am using snappymail. So, when I am sending mail using snappymail the email gets the panel domain from there. Let me install RoundCube on a different domain. Let’s check what happens.

So this is your mailserver domain. No matter what service you use to send an emai the mailserver domain in all emai headers will state as follows:

Received: from backend.ushv.xyz (server.usahive.net [123.456.789])

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.