User Tools

Site Tools


s-mailx

This is an old revision of the document!


S-mailx (aka s-nail)

S-mailx is an active fork of Heirloom mailx which ceased development around 2010. S-mailx has preserved most of the latter's feature set and added many of it's own. While there were plans to remove the inheirited POP3 and IMAP functionality these features have been retained due to popular demand, though a future re-write is likely. The project's developer provides a low-volume email list for end-user support; details at the homepage.

Documentation and Features

The s-mailx(1) manpage 1) is the best place to learn all it's features but the standouts are:

  • all of Heirloom-mailx features: POP3/IMAP/SMTP, folder hooks, macros, threading, etc.
  • Maildir support
  • optional coloration
  • enhanced spam filtering
  • detailed error reporting

One thing to be aware of is that even though s-mailx is a fork and largely a super-set of heirloom-mailx there is significant deviation with respect to command names and configuration syntax such that separate configuration files are necessary; attempting to craft a common configuration file for both will likely fail and potentially result in lost messages.

Setup

Running S-mailx

S-mailx actually installs as /usr/pkg/bin/s-nail on NetBSD which should avoid name collision with the native NetBSD mail/mailx and heirloom-mailx (/usr/pkg/bin/mailx) clients.

Configuration

The default user configuration file for S-mailx is ~/.mailrc, unfortunately also used by the native NetBSD mail(1) client. If you never plan to use native mail(1) then you can go ahead and put all your settings in ~/.mailrc ; chances are the native mail(1) will just ignore any settings it doesn't understand. A somewhat better option which maintains settings separation is to create a minimal ~/.mailrc and add the following to it:

set mailx-extra-rc="$HOME/.s-nailrc"

This will allow occasional / accidental use of the native mail(1) client and keeps all the “S-mailx-specific” settings in ~/.s-nailrc. Alternately, it's possible to (re)set MAILRC (shell environment variable) on-the-fly via a launch script for settings separation.

A basic SDF specific S-mailx configuration (using both ~/.mailrc and ~/.s-nailrc):

~sdfuser/.mailrc
## ~sdfuser/.mailrc
 
# Set top of mail folder tree to ~/mail:
set folder=mail
 
# Tell s-nail where to get additional configurations:
set mailx-extra-rc="$HOME/.s-nailrc"

Note that this technique is also used for the Heirloom mailx client via the NAIL_EXTRA_RC variable; having both NAIL_EXTRA_RC and mailx-extra-rc set in ~sdfuser/.mailrc will likely produce ignorable but annoying errors when S-mailx is run.

<file config ~/.s-nailrc> ## ~sdfuser/.s-nailrc file - use with /usr/pkg/bin/s-nail

# see s-nail(1) for details: set v15-compat=yes # allow “dot” EOF; reverse 'r'/'R'; print next msg: set bsdcompat dot flip autoprint

# set some additional headers (must separate w/ commas): set customhdr='Organization: SDF Public Access UNIX System,\

             Zodiac-Sign: Scorpio'
1)
use $ man s-nail to ensure you are reading s-mailx documentation
s-mailx.1644255797.txt.gz · Last modified: 2022/02/07 17:43 by zilog