mailstats(1) on Solnix vs Linux and the BSDs
On Solnix, mailstats is the illumos mailstats at /usr/bin/mailstats, and it has the same six options as FreeBSD mailstats. The notable differences are the manual section (1 on Solnix, 8 on FreeBSD) and where the manuals say the statistics file comes from. The bundle has no Linux, OpenBSD or NetBSD counterpart page.
The manual pages
- Solnix: mailstats(1) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: mailstats(8) 15.1-RELEASE
What Solnix runs
A default Solnix system runs the illumos mailstats at /usr/bin/mailstats. No other variants are shipped. The page is published by pkgs.solnix.illumos-world-man. It reads statistics that sendmail(8) collects.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | manual section and path | Solnix documents mailstats as a user command, section 1, at /usr/bin/mailstats. FreeBSD documents it in section 8, the system administration section. The FreeBSD page gives no install path.Source: Solnix mailstats(1) header; FreeBSD mailstats(8) header |
| FreeBSD | -f statistics file default | The Solnix page names /etc/mail/statistics as the default statistics file, and says it is the file named by the StatusFile option in /etc/mail/sendmail.cf. FreeBSD says -f overrides the file given in the sendmail configuration file, and names no default path.Source: Solnix mailstats(1) DESCRIPTION, -f; FreeBSD mailstats(8) -f |
| FreeBSD | enabling collection | The Solnix page says that to enable statistics you must, as root, touch /etc/mail/statistics, because collection depends on the StatusFile file existing. The FreeBSD page does not say how to enable collection.Source: Solnix mailstats(1) DESCRIPTION; FreeBSD mailstats(8) DESCRIPTION |
| FreeBSD | header time lines | Solnix prints the time the statistics file was created and the time it was last modified. FreeBSD prints only the time statistics started being kept, in ctime(3) format. A script that parses the first lines of output may see different lines. Source: Solnix mailstats(1) DESCRIPTION; FreeBSD mailstats(8) DESCRIPTION |
| FreeBSD | exit status | The FreeBSD page documents exit 0 on success and >0 on error. The Solnix page has no EXIT STATUS section, so the manual does not say what it returns. Source: FreeBSD mailstats(8) DESCRIPTION (last paragraph); Solnix mailstats(1) (no EXIT STATUS section) |
| FreeBSD | output stability and large files | The Solnix page lists Output Stability as Unstable, so the output format may change. It also refers to largefile(7) for files of 2 Gbyte or more. The FreeBSD page makes neither statement. Source: Solnix mailstats(1) ATTRIBUTES, USAGE; FreeBSD mailstats(8) |
| FreeBSD | nightly reset | The Solnix page suggests a root crontab(1) entry, mailstats -p > /dev/null, to reinitialise the statistics file once a night. The FreeBSD page has no such example. The -p flag clears statistics on both systems.Source: Solnix mailstats(1) DESCRIPTION, -p; FreeBSD mailstats(8) -p |
Standards
- POSIX: mailstats is not a POSIX.1-2024 utility.
- Solnix: Output Stability is Unstable.
Writing portable scripts
- Use
-P, not-p, when a script only reads the statistics, because-pclears them on both Solnix and FreeBSD. - Do not rely on the first output lines or the exit status being the same on both systems. Parse from the M-field lines and the = separator, T and C lines.
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.