Using Leap 15.4 and Postfix 3.5.9 and mail 12.5.
I am trying to get my email server to send emails from system and cron jobs etc. and via the CLI . However, unless I specify the “-r” from address parameter in the scriptfile for the mail command they are bounced, as the emails are from root or user. I need to set a default from address such as firstname.lastname@example.org. I have looked at the output of info mail and I see reference in the -r address information and it refers to environment or startup variables.
Typical error message is:-
2022-12-26T15:46:55.848604+00:00 venus postfix/qmgr: CBE4B6F400B: email@example.com, size=414, nrcpt=1 (queue active)
2022-12-26T15:46:57.312754+00:00 venus postfix/smtp: CBE4B6F400B: firstname.lastname@example.org, relay=smtp.ntlworld.com[22.214.171.124]:25, delay=1.5, delays=0.03/0.01/0.33/1.1, dsn=5.1.0, status=bounced (host smtp.ntlworld.com[126.96.36.199] said: 550 5.1.0 From address is invalid (VM402) (in reply to MAIL FROM command))
Can someone help with telling what variable to set and how.
Tried that early on and apparently it only works for “local delivery”. I did set root to email@example.com in the alias file and ran newaliases - no luck. The log file still shows root