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.

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 withTopicWhat differs
FreeBSDmanual section and pathSolnix 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 defaultThe 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
FreeBSDenabling collectionThe 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
FreeBSDheader time linesSolnix 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
FreeBSDexit statusThe 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)
FreeBSDoutput stability and large filesThe 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)
FreeBSDnightly resetThe 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 -p clears 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.