Date: Fri, 16 Dec 2022 02:13:19 +0000 From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 268402] mail(1) save command doesn't adhere to POSIX fallback to mbox Message-ID: <bug-268402-99@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268402 Bug ID: 268402 Summary: mail(1) save command doesn't adhere to POSIX fallback to mbox Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: standards Assignee: standards@FreeBSD.org Reporter: freebsd@tim.thechases.com According to the POSIX definitions for mail(1), the (s)ave command should save to "mbox" if the file is not specified > Save the specified messages in the file named > by the pathname file, or the mbox if the file > argument is omitted https://pubs.opengroup.org/onlinepubs/9699919799/utilities/mailx.html#tag_2= 0_75_13_33 > s[file] > Save the message in the named file > (mbox is default). https://pubs.opengroup.org/onlinepubs/7908799/xcu/mail.html#tag_001_014_1339 However, when exercising this functionality, mail(1) on FreeBSD (also tested on OpenBSD where the same issue manifests) doesn't support this: demo$ echo test | mail -s test $USER demo$ mail Mail version 8.1 6/6/93. Type ? for help. "/var/mail/demo": 1 message 1 new >N 1 demo@localhost.my.do Thu Dec 15 19:34 19/775 "test" & s No file specified. While I'm not positive on the solution, I think it involves tweaking the save1() function in src/usr.bin/mail/cmd2.c such that instead of failing if it can't snarf(), it should set `file` to "mbox" or "&" so that expand() points to the mbox as required by POSIX. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268402-99>