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.
The manual pages
- Solnix: mail.local(8) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: mail.local(8) 15.1-RELEASE
- OpenBSD: mail.local(8) 8.0
- NetBSD: mail.local(8) 11.0
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 with | Topic | What differs |
|---|---|---|
| OpenBSD, NetBSD | -l meaning | Solnix -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 meaning | Solnix -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, NetBSD | missing options | OpenBSD 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, NetBSD | locking method | The 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 |
| OpenBSD | disabling lock files | OpenBSD -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, NetBSD | recipient operands | The 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 argument | Solnix -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 |
| FreeBSD | FreeBSD-only options | FreeBSD 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 |
| FreeBSD | mailbox file creation | Solnix 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 |
| OpenBSD | spool directory security | OpenBSD 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 |
| OpenBSD | quotas with sendmail | OpenBSD'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
-fsender 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,-dor-rin portable scripts.-lmeans 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.