Hello, i am the maintainer of S-nail, which is what one gets on a current Debian when you install heirloom-mailx. (At least in testing it is.)
The problem of yours likely is that the *sendwait* variable is not set, i.e., your invocation should be /usr/bin/heirloom-mailx -Ssendwait -s test root@localhost < /tmp/test.txt because the MTA is otherwise invoked asynchronously, without waiting for it to return. That is, we exit to our superviser (anacron) immediately, but still have a child running (sendmail). If the superviser just cares enough it may cause all such "garbage processes" to be terminated, effectively resulting in you message not being sent. This conclusion is contradicted by your Even /usr/sbin/sendmail is not called in this case. however. I don't know what makes you think it isn't called. Note that the upcoming S-nail v14.9.0 will set *sendwait* in the global resource file for exactly that reason, by popular demand. Ciao. --steffen