getusername() (the nmh function) is called by programs like slocal and
rcvtty, which may not have a controlling terminal and I am unclear
what LOGNAME would mean in their environment as well.
True. cron(8) here sets $LOGNAME, but does .forward, etc?
I am thinking that falling back to getpwuid(getuid()) is the most
I notice that a setuid inc(1) has various troubles due to the use of
real user ID rather than effective.
So if the code stays as if then the documentation could do with
clarifying. I'll make a note.