mail.local(8) on Solnix vs Linux and the BSDs

On Solnix, mail.local is the illumos delivery agent at /usr/lib/mail.local, not on PATH. It is meant to be run by sendmail(8). The biggest trap is -l: on Solnix it turns on LMTP mode, as on FreeBSD, but on OpenBSD and NetBSD it controls mailbox lock files.

What Solnix runs

A default Solnix system runs the illumos /usr/lib/mail.local, which is outside /usr/bin, /usr/sbin and /sbin. No other variants are shipped. The page says it is intended for sendmail(8) as a local mail delivery agent and is not a user interface agent.

Differences

Compared withTopicWhat differs
OpenBSD, NetBSD-l meaningSolnix -l turns on LMTP mode. On OpenBSD and NetBSD, -l selects username.lock files for locking and has nothing to do with LMTP. The OpenBSD and NetBSD pages document no LMTP mode.
Source: Solnix mail.local(8) -l; OpenBSD mail.local(8) -l; NetBSD mail.local(8) -l
FreeBSD-d meaningSolnix -d names the recipient and is optional, so 'mail.local recipient' equals 'mail.local -d recipient'. FreeBSD documents -d as marking a delivery and says it has no effect.
Source: Solnix mail.local(8) -d; FreeBSD mail.local(8) -d
OpenBSD, NetBSDmissing optionsOpenBSD and NetBSD list no -7, -b, -d or -r. A script that passes -r from, -b or -7 (LMTP and quota handling) to Solnix or FreeBSD mail.local gets options these two pages do not document.
Source: Solnix mail.local(8) OPTIONS; OpenBSD mail.local(8) SYNOPSIS; NetBSD mail.local(8) SYNOPSIS
FreeBSD, OpenBSD, NetBSDlocking methodThe Solnix page documents only a .lock file for locking and does not mention flock(2). FreeBSD and OpenBSD always use flock(2) plus a lock file. NetBSD uses flock(2) by default and lock files only with -l.
Source: Solnix mail.local(8) DESCRIPTION; FreeBSD mail.local(8) DESCRIPTION; OpenBSD mail.local(8) DESCRIPTION; NetBSD mail.local(8) DESCRIPTION
OpenBSDdisabling lock filesOpenBSD -L skips creating the username.lock file. The Solnix page has no way to turn off its .lock file.
Source: OpenBSD mail.local(8) -L; Solnix mail.local(8) DESCRIPTION
FreeBSD, OpenBSD, NetBSDrecipient operandsThe Solnix synopsis shows a single recipient. The FreeBSD, OpenBSD and NetBSD synopses show 'user ...', so several users may be given on one command line.
Source: Solnix mail.local(8) SYNOPSIS, OPERANDS; FreeBSD/OpenBSD/NetBSD mail.local(8) SYNOPSIS
FreeBSD, OpenBSD, NetBSD-f argumentSolnix -f is the SMTP envelope sender, used in the 'From sender_address time_stamp' line, and is optional but should be given. The BSD pages call it just the sender's name.
Source: Solnix mail.local(8) -f, DESCRIPTION; FreeBSD/OpenBSD/NetBSD mail.local(8) -f
FreeBSDFreeBSD-only optionsFreeBSD adds -B (no biff notification), -s (skip fsync), -h filename (store mail in the user's home directory), -D mbdb, and compile-time -H, -p and -n. The Solnix page documents none of these.
Source: FreeBSD mail.local(8) -B, -s, -h, -D, -H, -p, -n; Solnix mail.local(8) OPTIONS
FreeBSDmailbox file creationSolnix creates mailbox files with mode 660, owner set to the recipient and group mail, and computes a Content-Length: header. The FreeBSD page documents none of this and escapes lines starting with 'From ' with '>'. The Solnix page does not mention that escaping.
Source: Solnix mail.local(8) DESCRIPTION; FreeBSD mail.local(8) DESCRIPTION
OpenBSDspool directory securityOpenBSD delivers only to a spool directory that is not world-writable. /var/mail is mode 755 there, so the MTA must create the spool file or run mail.local as root. The Solnix page states no such rule.
Source: OpenBSD mail.local(8) DESCRIPTION; Solnix mail.local(8) DESCRIPTION
OpenBSDquotas with sendmailOpenBSD's BUGS section warns that with quotas on /var/mail, sendmail(8) can redeliver to users who already got the message. The Solnix page documents -b (permanent error on quota) but has no such warning.
Source: OpenBSD mail.local(8) BUGS; Solnix mail.local(8) -b

Standards

  • POSIX: mail.local is not a POSIX.1-2024 utility.

Writing portable scripts

  • Call it as 'mail.local -f sender user'. That form is documented on all four systems. Do not assume it is on PATH: the Solnix page puts it at /usr/lib/mail.local.
  • Do not pass -l, -d or -r in portable scripts. -l means LMTP on Solnix and FreeBSD but lock files on OpenBSD and NetBSD.

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.