Proxmox Dynamic FQDN?

unholyhumorousunratedoat

Active Member
Sep 18, 2019
40
9
28
28
Hi guys!
I'm setting up a PMG and the customer has multiple domains lets say a.com, b.com and c.com and they want to send from all domains through the PMG. Before they were sending from their local Exchange server directly and now it should be done through the PMG :) The local domain is company.local.

When I'm sending test mails to mail-tester.com I get the following error:
"We could not find a server (A-Record) for your hostname pmg.company.local."

Which is correct, because there is no such A-Record. But for pmg.company.local I can't set an A-Record because they don't own company.local.
My idea is, that the PMG uses pmg.a.com as hostname, if someone sends from his mailbox user1@a.com and if there is another user let's say user2@b.com the PMG uses pmg.b.com as his hostname in the Mail Header.

Am I having a error in my thoughts? Is this possible?

Or should I set the hostname to pmg.a.com and then do PTR records for b.com and c.com?

Here are the config files:

/etc/hostname
Code:
pmg

/etc/hosts
Code:
127.0.0.1 localhost.localdomain localhost
192.168.0.57 pmg.company.local pmg

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/resolv.conf
Code:
search company.local
nameserver 192.168.0.7
 
Yea, I think they should hire someone who knows this stuff.

What exactly is your motivation in responding to a thread like mine with the intention of not helping but offending me for not knowing something?

I truly feel sorry for you spending time of your life with responding in forums for offending people.
 
  • Like
Reactions: Bob.Dig
to (semi) answer the original question, i don't think this is easily possible.

the only thing that comes to mind how it *could* work is to have multiple postfix instances, each responsible for a single
domain/hostname, but that would be a highly customized setup that won't be supported by us (if it's even possible to integrate properly)

but why is it so important what the hostname says ? shouldn't it just work to use either something.a.com or something.b.com ?
 
The PMG isn't directly on the internet, is it? It only runs as a smart host?

I would recommend using the PMG as an incoming and outgoing server, ideally it is also located on the Internet and can accept and process the e-mails directly itself. By using a transfer network, the IP can still be secured via a firewall. If he then gets an FQDN, you can also set the A-record correctly.

It does not matter whether the server is called mx10.company.com or actually "domain-b.com" for the transmission of the e-mails. It is important that the configuration is state-of-the-art.
 
Thank you for your answer.
PMG ist incoming and outgoing server.

The company has two "departments" with two different domains to send and receive E-Mails from. Receiving from multiple domains is no problem, I set that up in the relay domains.

But when it comes to sending from a.com or b.com, the mail score from https://www.mail-tester.com/ has -3 points because " We could not find a server (A-Record) for your hostname pmg.company.local.

That's obvious because there is no A-Record for pmg.company.local. That's the hostname of the PMG with the local domain FQDN.

So my question is: Can the FQDN of the PMG, which is sent in the mail headers be depended of the domain of the sender who sent the mail?

So when user1@a.com sends his mail, the PMG sends in the mail header "my hostname is pmg.a.com" and when user2@b.com sends a mail, the PMG sends in the mail header "my hostname is pmg.b.com"?

Then I could easily set the A-Records for both domains and have the perfect mail score :)
 
It doesn't seem like you've read or understood our answers. The solution would be to simply give the PMG an external IP with an A record. Whether the server name is mx10.company.com in there or domain-a.com doesn't matter anymore. It would probably be enough if you have a WAN IP and would route the A record to it and just rename the PMG.

Or what prevents you from doing so?
 
The PMG is reachable on Port 25 through the internet under a static public IP.

Well I guess you're right. That should solve the problem. I'll try it and let you know. Thanks for clarifying :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!