S-nail is a mail processing system with a command syntax reminiscent of ed(1) with lines replaced by messages. It is intended to provide the functionality of the POSIX mailx(1) command and offers (mostly optional) extensions for line editing, IDNA, MIME, S/MIME, SMTP and POP3 (and IMAP). It is usable as a mail batch language. S-nail is a derivative of Heirloom mailx, formerly known as nail, which itself is based upon Berkeley Mail that has a history back to the 70s.