Proxmox Mail Gateway

powersupport

Well-Known Member
Jan 18, 2020
291
2
58
30
Hi team,

We would like to make some changes to the Proxmox Mail Gateway email notification.
1. change postmaster from the Proxmox notification from postmaster@localhost.localdomain to emailsecurity@localhost.localdomain

2. Remove the localhost from the Proxmox email notification, from postmaster@localhost.localdomain to postmaster@localdomain

The Proxmox Mail Gateway version is 8.1.2

Could you please advise how we can configure it?

We are looking forward to your reply.

Thank you
 
1. change postmaster from the Proxmox notification from postmaster@localhost.localdomain to emailsecurity@localhost.localdomain
the postmaster part is hardcoded in quite a few places - and since postmaster has to exist for each domain (in PMG's case the hostname) https://en.wikipedia.org/wiki/Postmaster_(computing) it still seems like a good choice (usually the mails come from postmaster@pmg.full.hostname - so it should not clash with other uses of postmaster@)

2. Remove the localhost from the Proxmox email notification, from postmaster@localhost.localdomain to postmaster@localdomain
How was this PMG setup (from ISO, the PVE-container-template, on top of Debian)? - Asking mostly to see if we can prevent this in general

please share:
* pmgconfig dump (anonymize what you have to - but consistently (replace your.domain, everywhere by the same placeholder)
* /etc/hosts
* /etc/resolv.conf
* /etc/pmg/templates/* (at least main.cf.in and master.cf.in)
 
Hi Support,

For the first concern, we understand that changing the "postmaster" to "emailsecurity" is not advisable, as it can cause compatibility issues due to the address being hardcoded.

For the second concern:

PMG Installation Date: We started using proxmox to our live environment, October 2024
ISO = Yes
Debian: Debian GNU/Linux 12

Regarding /etc/hosts and /etc/resolv.conf, please refer to the attached file.

Regarding /etc/pmg/templates/ (specifically main.cf.in and master.cf.in),
Please see the image. The "/etc/pmg/" directory does not contain a "template" folder.

Could you please advise how we can configure it?

We are looking forward to your reply.

Thank you
 
Last edited:
the output of `pmgconfig dump` is missing - but probably not needed.

* the mails originating from pmg should have postmaster@pmg1.your.domain.co.jp as envelope-sender (and not postmaster@localhost.localdomain) - if not please share the logs of such a mail.

I deleted the zip-file, because you anonymized (private) IPs, but left the domain name visible...
 
2. Remove the localhost from the Proxmox email notification, from postmaster@localhost.localdomain to postmaster@localdomain


I hope I have found a solution for this.

I was struggling a lot with this issue, and it seems that PMG retrieves the domain for the file /var/lib/pmg/templates/main.cf.in from the DNS configuration. Therefore, you need to have your domain inside /etc/resolv.conf. You can add it manually, but every reboot will regenerate the file, causing this line to be missing.

However, if you check your symlink using:

Code:
ls -l /etc/resolv.conf

it should be linked to /etc/resolvconf/resolv.conf.d/base In this file, you need to add the following line:


Code:
search *your domain*
After rebooting, my server is now working with the properly configured domain, and everything looks fine! :)

I hope it will help in your case!
DNS.png1740609687219.png1740609723308.png
 
Last edited: