RCVTTY(1)

πŸ“¦
version 1.8 Β· 4 versions
, in alpine 3.24, epel 10, epel 9, fedora 43, fedora 44

πŸ’Œ RCVTTY(1) β€” the "omg you got mail" era πŸ’Œ

okay bestie, welcome to the General Commands Manual, section 1, and today's main character is rcvtty from the nmh fam. it lives in the group chat of mail-handling tools and its whole thing is: yell at your terminal when new mail shows up. let's get into it 🫢


✨ NAME ✨

rcvtty β€” report new mail with nmh πŸ’–


🌸 SYNOPSIS 🌸

/usr/libexec/nmh/rcvtty [-help] [-version] [command] [-form formatfile]
     [-format string] [-width columns] [-bell | -nobell] [-newline |
     -nonewline] [-biff]

yes the path is that long, it's giving very "installed in the system's private little folder" energy, we love a queen who knows where she lives πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so rcvtty is the girl who tells you about new mail. literally her whole job. she's usually working alongside mail filtering agents like slocal or procmail β€” think of them as the bouncers at the club and rcvtty as the friend who texts you "bestie there's someone here for you" 😭

here's the vibe: rcvtty runs the named command, hands the message to it as standard input, and then writes whatever that command spits out onto your terminal. so the message goes in, the output comes out, and you see it. slay.

but plot twist ✨ β€” if no command is specified (or the command is bogus, awkward), then rcvtty doesn't run anything. instead she writes a one-line scan listing. iconic behavior honestly. and you can override what that default scan listing looks like by using either -form formatfile or -format string, which work basically the same as the equivalent options for scan and inc. if you want the full lore on formatting, go read mh-format(5), she explains everything πŸ“–

now the little details that matter:

  • a newline gets output before the message output, and the terminal bell gets rung after the output. drama, but make it functional πŸ””
  • -nonewline and -nobell will inhibit those functions. so if you're not in the mood for the whole production, you can turn it off, no cap.
  • -width columns lets you specify the width of the scan line. the default? the width of your terminal. she's adaptive like that πŸ’…

πŸŽ€ the extra format escapes πŸŽ€

besides the standard format escapes described in mh-format(5), rcvtty also recognizes these extra component escapes, and honestly they're lowkey the best part:

  • body β€” string β€” the (compressed) first part of the body πŸ“
  • dtimenow β€” date β€” the current date ⭐
  • folder β€” string β€” the name of the current folder 🌈

πŸ‘‘ where does the output go tho πŸ‘‘

by default, rcvtty sends her output to every terminal on the local machine that is:

  1. owned by the current user, and
  2. has given write permission as granted by the command mesg(1).

but if you pass the -biff option, then rcvtty will obey the notification status set by the command biff(1) instead. different queen, different rules. pick your fighter πŸ₯Š


πŸ’œ FILES πŸ’œ

  • /etc/nmh/mts.conf β€” nmh mts configuration file
  • $HOME/.maildelivery β€” the file controlling local delivery
  • /etc/nmh/maildelivery β€” rather than the standard file

🧚 CONTEXT 🧚

None.

(no context, she said. mysterious. we respect it πŸ™ˆ)


🌟 DEFAULTS 🌟

  • -width defaults to the width of the terminal
  • -newline
  • -bell

πŸ”₯ SEE ALSO πŸ”₯

mh-format(5), rcvdist(1), rcvpack(1), rcvstore(1), slocal(1)

the whole girl group honestly, go say hi to all of them πŸ’–


πŸ’€ BUGS πŸ’€

Only two return codes are meaningful, others should be.

bestie that's it. that's the bug. two return codes are meaningful, the rest are just... there. not me side-eyeing the other return codes 😭

okay that's the whole page, and as a little sign-off: this gem is from nmh-1.8, dated 1999-04-30 β€” yes she's an elder millennial but she's still serving, and she ate, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from