on redhat 7.3, courier 0.39 and 0.42
and yeah, the alias root to nonpriv account, i know. output from root's batch job disappears and (even better) no log. output from nonpriv user's jobs send ok.
this works: # /usr/bin/sendmail <<eof From: root To: root Subject: dammit
testing eof
a simple batch job like ``echo "echo this is a test" | batch'', as root, produces no mail.
Some buggy versions of cron or at run commands without providing a standard error and/or standard output and/or standard input.
atd does it's thing, output in /var/spool/at/spool/bfoo, execve's sendmail, but it looks like the fd's get mixed up in courier/submit and it throws EBADF:
That's what happens when, on UNIX, you run a command that's meant to be executed from the command line, but fail to provide the mandatory three I/O streams.
Try putting the following nonsense before the command:
exec >/dev/null; exec 2>/dev/null; exec 1</dev/null;
pgp00000.pgp
Description: PGP signature
