Change the server name in outgoing emails

Boone87

New Member
Feb 25, 2024
1
0
1
Hi, I have a problem with the mail server.
I have an email server on zimbra (zimbra.example.com ) and there is Proxmox mail gateway in front of it (pmg.example.com ).
My mailboxes have the form user@example.com

When sending a message, the receiving party checks the domain example.com to match the ip address.

But in this case, because the emails are sent from the server pmg.example.com then the server is being checked pmg.example.com which is not there.

if I specify "myhostname=example.com " in the /etc/pmg/templates/main.cf.in file
Then the checks are successful, but when receiving mail, proxmox mail gateway begins to search for users in itself and respond to all emails that the user is not in the local table

How can I change the server name only for outgoing emails?
 
Hi, I have a problem with the mail server.
I have an email server on zimbra (zimbra.example.com ) and there is Proxmox mail gateway in front of it (pmg.example.com ).
My mailboxes have the form user@example.com

When sending a message, the receiving party checks the domain example.com to match the ip address.

But in this case, because the emails are sent from the server pmg.example.com then the server is being checked pmg.example.com which is not there.

if I specify "myhostname=example.com " in the /etc/pmg/templates/main.cf.in file
Then the checks are successful, but when receiving mail, proxmox mail gateway begins to search for users in itself and respond to all emails that the user is not in the local table

How can I change the server name only for outgoing emails?
Try the following:

In /etc/pmg/templates/main.cf.in - instead of changing the myhostname setting (revert back to original), add below it a new line with:
myorigin = $mydomain

so it will look like this:
...
myhostname = [% dns.hostname %].[% dns.domain %]
myorigin = $mydomain
...

Careful, you will need to redo this after future PMG updates.
 

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!