mail(1) on Solnix vs Linux and the BSDs
On Solnix, mail is the illumos /usr/bin/mail, which has its own option set. It has no -s subject, -c or -b, so the common BSD form 'mail -s subject addr' is not in its synopsis. Several letters also mean different things: -E, -r and -f.
The manual pages
What Solnix runs
A default Solnix system runs the illumos mail at /usr/bin/mail. The page also documents rmail, a send-only form of the same program. /usr/ucb/mail is shipped as well, but the bundle does not describe it.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD, OpenBSD, NetBSD | subject and cc/bcc options | The Solnix synopsis has no -s subject, -c or -b. FreeBSD, OpenBSD and NetBSD take -s, -c and -b on the command line. A BSD-style 'mail -s subject addr' is not covered by the Solnix synopsis.Source: Solnix mail(1) SYNOPSIS; FreeBSD mail(1) SYNOPSIS; OpenBSD mail(1) -s, -c, -b; NetBSD mail(1) -s, -c, -b |
| OpenBSD, NetBSD | -E meaning | On Solnix, -E tests only for new mail and sets the exit status: 0 for new mail, 1 for no mail, 2 for mail that was already read. On OpenBSD and NetBSD, -E means do not send messages with an empty body.Source: Solnix mail(1) -E; OpenBSD mail(1) -E; NetBSD mail(1) -E |
| OpenBSD, NetBSD | -r meaning | Solnix -r prints messages first-in, first-out. OpenBSD -r sets the from address of the message and envelope. NetBSD -r names an alternate rcfile to load.Source: Solnix mail(1) -r; OpenBSD mail(1) -r from-addr; NetBSD mail(1) -r |
| OpenBSD, NetBSD | -f argument | Solnix -f requires a file argument, for example mbox, used instead of the default mailfile. On OpenBSD, -f takes an optional file and defaults to the user's mbox. NetBSD's synopsis also shows [name] as optional.Source: Solnix mail(1) SYNOPSIS, -f file; OpenBSD mail(1) -f; NetBSD mail(1) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | -u user | Solnix has no -u. FreeBSD, OpenBSD and NetBSD use -u user to read another user's mailbox. OpenBSD and NetBSD document it as equivalent to mail -f /var/mail/user, with locking on OpenBSD.Source: Solnix mail(1) SYNOPSIS; OpenBSD mail(1) -u; NetBSD mail(1) -u; FreeBSD mail(1) SYNOPSIS |
| NetBSD | -h and -H headers | Solnix -h (lowercase) shows a window of headers at start instead of the latest message, then the ? prompt. NetBSD -H (uppercase) prints header summaries and exits, and takes colon-modifiers such as -H:n for new messages.Source: Solnix mail(1) -h; NetBSD mail(1) -H |
| FreeBSD, OpenBSD, NetBSD | default reading order | Solnix prints messages last-in, first-out unless -r is given. On OpenBSD and NetBSD, the current message starts as message 1, the first message.Source: Solnix mail(1) Reading Mail (-r and LIFO paragraph); OpenBSD mail(1) Reading mail; NetBSD mail(1) Reading mail |
| FreeBSD, OpenBSD, NetBSD | end of message input | Solnix ends input at end-of-file or, on a terminal, at a line holding only a period. OpenBSD and NetBSD describe ending the message with control-D at the beginning of a line. They do not mention a period. Source: Solnix mail(1) DESCRIPTION; OpenBSD mail(1) Sending mail; NetBSD mail(1) Sending mail |
| FreeBSD, OpenBSD, NetBSD | startup files and options | OpenBSD and NetBSD run /etc/mail.rc and ~/.mailrc at startup, and -n skips /etc/mail.rc. Solnix has no -n. The Solnix text in the bundle does not describe these files.Source: OpenBSD mail(1) -n, Startup actions; NetBSD mail(1) -n, -r; Solnix mail(1) SYNOPSIS |
| FreeBSD, NetBSD | trailing sendmail flags | NetBSD passes flags that follow the recipient list straight to sendmail(1), and FreeBSD's synopsis shows [-sendmail-option]. On Solnix, options come before the recipients, and -x debug_level is a debugging option.Source: NetBSD mail(1) Sending mail; FreeBSD mail(1) SYNOPSIS; Solnix mail(1) SYNOPSIS Debugging |
| all four | rmail and the message header format | Only Solnix documents rmail, a send-only form used by uucp(1C). Solnix mail also adds a Content-Length: header to any letter with content. The other pages in the bundle do not describe either feature. Source: Solnix mail(1) NAME, DESCRIPTION, rmail paragraph |
| Linux | GNU Mailutils page | The Linux page is GNU Mailutils mail. It says only 'GNU mail -- the standard /bin/mail interface' and points to the Texinfo manual. The bundle shows no options, so no flag comparison with Solnix is possible.Source: Linux mail(1) NAME, DESCRIPTION, SEE ALSO |
| FreeBSD | dead.letter location | Solnix saves an interrupted message to dead.letter, trying the current directory first and then the login directory. FreeBSD uses the DEAD variable, default ~/dead.letter. The Solnix text in the bundle does not mention DEAD. Source: Solnix mail(1) Sending Mail (dead.letter paragraph); FreeBSD mail(1) ENVIRONMENT DEAD |
Standards
- POSIX: mail is not a POSIX.1-2024 utility.
Writing portable scripts
- Do not use
-E,-r,-for-sin portable scripts: their meanings or availability differ across Solnix, OpenBSD, NetBSD and FreeBSD. Check the local synopsis first. - For a plain 'is there mail?' test, Solnix 'mail
-e' returns exit status 0 if the user has mail and 1 otherwise. Check the other systems' pages before relying on it.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.