Hello,
I am experiencing repeated bounced emails in my mail server logs when the system attempts to send notifications. The emails are bouncing specifically from Gmail due to authentication failures, even though my domain's SPF, DKIM, and DMARC records are correctly set up and verified (and I can send emails successfully from regular user accounts).
The core issue appears to be the sender address used by the system for internal emails.
Log Details of the Bounced Email (Postfix):
- Mail initiation by system user:
2025-10-19T10:15:35.695633+03:00 mail postfix/pickup[261595]: A9AEA4525A6: uid=1001 from=<www>
- Sender address constructed by Postfix:
2025-10-19T10:15:39.922336+03:00 mail postfix/qmgr[1809]: A9AEA4525A6: from=<**www@mail.vienxxx.com**>, size=1703, nrcpt=1 (queue active)
Bounce Error Detail (Gmail response):
... status=bounced (host gmail-smtp-in.l.google.com said: 550-5.7.26 Your email has been blocked because the sender is unauthenticated. ... SPF [mail.vienxxx.com] with IP: [51.178.82.163] = did not pass...)
- My server hostname is mail.vienxxx.com.
- The system uses the unprivileged user
www (uid=1001) to send mail.
- All my Cloudflare DNS records (SPF, DKIM, DMARC) are correctly published and confirmed.
How can I configure Postfix or the system (aapanel/PHP) to use a valid, authenticated email address (e.g., noreply@vienxxx.com) instead