postfix:
image: juanluisbaptiste/postfix:latest
restart: always
environment:
- SMTP_SERVER=myhost.domain.ltd
- SMTP_PORT=587
- SMTP_USERNAME=sm-localdocker@user
- SMTP_PASSWORD=123123123123
- SERVER_HOSTNAME=localhost
- OVERWRITE_FROM=monitoring@mydomain.ltd
volumes:
- "/etc/localtime:/etc/localtime:ro"
Describe the issue
As I try to rewrite the from address via OVERWRITE_FROM, it doesn't work:
Dec 16 12:09:02 pfx-nag postfix/master[1]: daemon started -- version 3.10.4, configuration /etc/postfix
Dec 16 12:09:29 pfx-nag postfix/smtpd[99]: connect from nagios-nagios-1.nagios_default[192.168.16.2]
Dec 16 12:09:29 pfx-nag postfix/smtpd[99]: 09EF34F7: client=nagios-nagios-1.nagios_default[192.168.16.2]
Dec 16 12:09:29 pfx-nag postfix/cleanup[102]: 09EF34F7: message-id=<20251216110928.E7A967010@af5be243f321>
Dec 16 12:09:29 pfx-nag postfix/smtpd[99]: disconnect from nagios-nagios-1.nagios_default[192.168.16.2] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Dec 16 12:09:29 pfx-nag postfix/qmgr[97]: 09EF34F7: from=<root@af5be243f321>, size=591, nrcpt=1 (queue active)
Dec 16 12:09:29 pfx-nag postfix/smtp[103]: 09EF34F7: to=<XXXXXXXXXXXXXXX>, relay=mailrelay.mydomain.ltd[XXXXXXXXXXXXX]:587, delay=0.44, delays=0.02/0.04/0.31/0.08, dsn=5.5.2, status=bounced (host mailrelay.mydomain.ltd[XXXXXXXXXXXXX] said: 504 5.5.2 <root@af5be243f321>: Sender address rejected: need fully-qualified address (in reply to RCPT TO command))
Dec 16 12:09:29 pfx-nag postfix/cleanup[102]: 799144FC: message-id=<20251216110929.799144FC@pfx-XXXXXXXXX>
Dec 16 12:09:29 pfx-nag postfix/bounce[105]: 09EF34F7: sender non-delivery notification: 799144FC
Dec 16 12:09:29 pfx-nag postfix/qmgr[97]: 799144FC: from=<>, size=2693, nrcpt=1 (queue active)
Dec 16 12:09:29 pfx-nag postfix/qmgr[97]: 09EF34F7: removed
Dec 16 12:09:29 pfx-nag postfix/smtp[103]: connect to mailrelay.mydomain.ltd[2a01:4f8:1c1c:365e::1]:587: Address not available
Dec 16 12:09:29 pfx-nag postfix/smtp[103]: 799144FC: to=<root@af5be243f321>, relay=mailrelay.mydomain.ltd[XXXXXXXXXXXXX]:587, delay=0.29, delays=0.01/0/0.25/0.04, dsn=5.5.2, status=bounced (host mailrelay.mydomain.ltd[XXXXXXXXXXXXX] said: 504 5.5.2 <root@af5be243f321>: Recipient address rejected: need fully-qualified address (in reply to RCPT TO command))
Dec 16 12:09:29 pfx-nag postfix/qmgr[97]: 799144FC: removed
As you can see the from will not override as it needed to send the mail from.
from=<root@af5be243f321>
Also I I use mail -s "test" -a "from:myeimal.domain.ltd" it does not work because the from will no update to the right value
Describe the issue
As I try to rewrite the from address via
OVERWRITE_FROM, it doesn't work:As you can see the from will not override as it needed to send the mail from.
from=<root@af5be243f321>Also I I use mail -s "test" -a "from:myeimal.domain.ltd" it does not work because the from will no update to the right value