How to change default return-path sender (mailer-daemon@hostname) in PMG?

powersupport

Well-Known Member
Jan 18, 2020
376
23
58
31
Hi Team,


We are using Proxmox Mail Gateway (PMG).


When emails bounce or fail to send, PMG sends a message from mailer-daemon@<hostname>.
The problem is that this email address is not allowed by our SPF/DMARC settings, so other servers sometimes reject it.


Is there a way to change the sender address for these bounce messages to use a different domain that passes SPF/DMARC?


We looked in the PMG web interface but couldn’t find where to change it.


Thank you!
 
Please share the logs of such a message, and it's rejection - this should help getting a clear picture of which part fails, and what needs to be adapted.

in general changing addresses used by the mail-system is not a good idea.
 
we have the same problem.

our pmg is relaying for int.domaina.de and int.domainb.de and bounces get MAILER-DAEMON@pmg.domaina.de as sender adress (for example when mail is rejected from the mailcow server behind pmg), but this is problematic as this would trigger dmarc issues, so we would like to use MAILER-DAEMON@int.domaina.de instead.

where/how can we configure that ?

here is such bounce:


This is the mail system at host pmg.domaina.de.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<rolandtest@int.domaina.de>: host 172.16.36.19[172.16.36.19] said: 554
5.7.1 This message does not meet our delivery requirements (in reply to end
of DATA command)


Reporting-MTA: dns; pmg.cybercon.de
X-Proxmox-Queue-ID: 2546110031C
X-Proxmox-Sender: rfc822; test-email-sender@somedomain.de
Arrival-Date: Tue, 23 Jun 2026 14:27:23 +0200 (CEST)

Final-Recipient: rfc822; rolandtest@int.domaina.de
Original-Recipient: rfc822;rolandtest@int.domaina.de
Action: failed
Status: 5.7.1
Remote-MTA: dns; 172.16.36.19
Diagnostic-Code: smtp; 554 5.7.1 This message does not meet our delivery
requirements