NEWMAIL(1)

πŸ’Œ NAME

okay so bestie, meet newmail(1) β€” from the Mail Utilities girlies, it's a biff like tool for the terminal. ✨


πŸ“œ SYNOPSIS

newmail [-b] [-h] [-i interval] [-r] [-w] [ mbox [...]]

🌸 DESCRIPTION

Here's the vibe: newmail monitors a given set of mailboxes and looks for new mail. The second new mail comes in, the sender and subject get written on the terminal it was started from. And by default newmail puts itself in the background so the console stays usable β€” considerate queen behavior honestly. πŸ’…

newmail is able to monitor arbitrary numbers of mailbox files. If no mailbox was specified on the commandline, it monitors the default mailbox, which may be overwritten by the MAIL environment variable.

If more than one mailbox is being monitored, a prefix is printed for each mail line so the user can distinguish between the different mailbox files. By default the prefix is the name of the mailbox without its path. And if a mailbox is specified as path=string, then string will be used as the prefix for mails received in the mailbox denoted by path. cute, right? πŸŽ€

Also!! newmail can decode header lines when non-ascii characters are transported. They'll be displayed properly if the locale (LC_CTYPE) is set accordingly. ✨


✨ OPTIONS ✨

  • -b β€” ring a bell after one or more incoming mails have been detected for at least one mailbox. πŸ””
  • -h β€” print a help message.
  • -i interval β€” set the interval between two mailbox checks to interval seconds. The default is 60 seconds, which is suffient for the terminal. For the use inside of a window or dock application a lower value may be prudent.
  • -r β€” emit raw data from the mail. This will bypass routines to decode character encodings used for mail headers as described in RFC 2047. This may be useful for window applications that want to decode the strings on their own. πŸ™ˆ
  • -w β€” run as window application. This will prevent newmail from moving itself into the background so its output can be used as input for a window application. This will also change the output format slightly and prevent a bell to be rung after new mail has been received. πŸͺŸ

πŸ–¨οΈ OUTPUT FORMAT

the output format is giving different depending on whether a human or a program (-w) is reading it:

           newmail:
              >> Mail from <from> - <subject>
              >> Priority mail from <from> - <subject>

              >> <folder>: Mail from <from> - <subject>
              >> <folder>: Priority mail from <from> - <subject>

           newmail -w:
              <from> - <subject>
              Priority: <from> - <subject>

              <folder>: <from> - <subject>
              <folder>: Priority: <from> - <subject>

It should be easy for third party programs which are interested in such information to parse the output when newmail is running with the -w option. 🧚


🌍 ENVIRONMENT

newmail supports the following environment variables:

  • LANG β€” locale setting for the output character set.
  • LC_CTYPE β€” locale setting only for the output character set.
  • MAIL β€” full path of the user's spool mailbox.

πŸ“ NOTES

This program is inspired by the newmail program from the Elm interactive mail program. It is a rewrite from scratch though. πŸ’€

Many thanks go to Dave Taylor and the Elm Development Group who have provided me with a great mail program for several years. Many additional thanks go to the former lead developer Dave Taylor who started the program back in 1986. 🫢


πŸ‘€ SEE ALSO

locale(7).


πŸ‘‘ AUTHOR

Joey Schulze <joey@infodrom.org>


and that's the whole page bestie πŸ’– β€” signed off by Infodrom Oldenburg, dated February 8th, 2006. go forth and never miss a mail again ✨

πŸ“¦ where this page comes from