Strange problem. Just upgraded a FreeBSD 12.4 server to 13.3, then updated all packages. No problems, as usual and expected.
EXCEPT: Since then, the command /usr/bin/mail just hangs for normal users. It works for root. The command /usr/local/bin/mail (comes from the mailtools package, installed due to emacs) works fine, as does using sendmail directly. The machine is configured with sendmail turned off, instead using ssmtp, for direct delivery of mail to an outside smarthost; that part can't be completely broken, since invoking sendmail directly and using the mailtools version are working.
Here are the last 10 lines from "truss /usr/bin/mail -s test ralph@valid.example.com":
And there is no fork, exec, thread stuff, or locking in the trace. Hanging there makes no sense to me.
I suspect it is some sort of permission problem, but I don't know where to start looking.
EXCEPT: Since then, the command /usr/bin/mail just hangs for normal users. It works for root. The command /usr/local/bin/mail (comes from the mailtools package, installed due to emacs) works fine, as does using sendmail directly. The machine is configured with sendmail turned off, instead using ssmtp, for direct delivery of mail to an outside smarthost; that part can't be completely broken, since invoking sendmail directly and using the mailtools version are working.
Here are the last 10 lines from "truss /usr/bin/mail -s test ralph@valid.example.com":
Code:
mmap(0x0,1112,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 68978910466048 (0x3ebc67749000)
minherit(0x3ebc67749000,1112,INHERIT_ZERO) = 0 (0x0)
getrandom("\M-zd\^\B\M-'bE\M^\\M^Ab3\M-k""...,40,0) = 40 (0x28)
openat(AT_FDCWD,"/tmp/mail.Rs0LF1ve4nN2",O_RDWR|O_CREAT|O_EXCL,0600) = 3 (0x3)
fcntl(3,F_GETFL,) = 2 (0x2)
fcntl(3,F_SETFD,FD_CLOEXEC) = 0 (0x0)
fstatat(AT_FDCWD,"/tmp/mail.Rs0LF1ve4nN2",{ mode=-rw------- ,inode=2648459,size=0,blksize=32768 },0x0) = 0 (0x0)
unlink("/tmp/mail.Rs0LF1ve4nN2") = 0 (0x0)
sigprocmask(SIG_BLOCK,0x0,{ }) = 0 (0x0)
fstat(0,{ mode=crw--w---- ,inode=113,size=0,blksize=4096 }) = 0 (0x0)
ioctl(0,TIOCGETA,0x3ebc63fde1c4) = 0 (0x0)
I suspect it is some sort of permission problem, but I don't know where to start looking.