We have an EBS 12.2 instance running on RHEL 8.x that was working fine until recently but has started getting blank emails when sending using mailx from a shell script. I can't determine anything different between calling the script locally and with the EBS concurrent program, but when the concurrent program calls mailx, a message gets queued in postfix that has no subject, no body, and no To: header. Has anybody ever seen something like this? I know it's not a lot to go on, but I'm hoping it will ring a bell for somebody.
The call looks like this, and works fine from the interactive shell:
cat /tmp/file.tmp | mailx -s "Subject of message for ${TODAY}" $recipient
I was expecting to see an email with contents, subject, etc. I've tried forcing different shells in the script header and confirmed that the file exists with the right contents even when invoked from EBS.
I've also tried variations of the mailx command to try and get it to misbehave in the same way outside the concurrent program, but without any luck.