MAILSOUND(1)

πŸ’Œ MAILSOUND(1) β€” the mailsound manual, bestie edition πŸ’Œ

okay so real talk, this is the manual page for mailsound, a whole General Commands Manual situation, and I'm gonna walk you through it like we're texting at 2am. no cap. πŸŽ€


✨ NAME ✨

mailsound β€” plays sounds when mail is received πŸ¦‹πŸ””


🌸 SYNOPSIS 🌸

mailsound [-hszZvrd] soundname ...

that's it, that's the whole vibe check. πŸ’…


πŸ’– DESCRIPTION πŸ’–

okay so mailsound lets a user play sounds when new mail arrives. literally the cutest thing. it reads a mail message from stdin, and it uses Mark Boyns' rplay library to play the sounds. πŸ”₯

the sound that actually gets played? that's decided by a configuration file in the user's home directory called .mailsounds. every line in this file has two parts, like a little duo, iconic:

  1. the first part is a regular expression β€” it gets used to match the from address from a mail message.
  2. the second part describes what to do when a match is found. the options in the second part are identical to the options on the command line.

and here's the tea: the command line options set defaults which get used if they're not specified in the configuration file. 🫢

if not specified, the mailsound program will use the following defaults:

  • default sound: youvegotmail.au
  • default volume: 127 (50%)

and if the mail address doesn't match any of the regular expressions in the .mailsounds file, no sound will be played. silence. nothing. πŸ’€


πŸ‘‘ OPTIONS πŸ‘‘

  • -h hostname:[hostname...] β€” play sounds on all of these hosts. the more the merrier bestie 🌈
  • -z <minsize>:<minvolume>,<maxsize>:<maxvolume> β€” the volume the sound gets played at will be determined by the size of the mail message. so:
    • a message with a size smaller than <minsize> β†’ played at volume <minvolume>
    • a message with a size larger than <maxsize> β†’ played at volume <maxvolume>
    • a message with a size between <minsize> and <maxsize> β†’ played at a volume which is a linear interpolation between <minvolume> and <maxvolume> (math girlies rise up πŸ“βœ¨)
  • -Z <minsize>,<maxsize> β€” now the sound itself is determined by the size of the mail message:
    • message smaller than <minsize> β†’ the first listed sound is played
    • message larger than <maxsize> β†’ the last listed sound is played
    • message size between those two values β†’ the appropriate sound from the list is played 🎢
  • -s <subject re> β€” the regular expression supplied will have to match the subject of the message. if this option isn't there, the subject of the message is completely ignored. 🚫
⚠️ bestie be careful: make sure the regular expression does not contain spaces. due to laziness of the author of this program, this will hopelessly confuse the program. like, it will simply not understand you. 😭
  • -v <int> β€” set the volume at which the sound should be played. the range is 0-255. πŸ“’
  • -r β€” pick a sound at random from the list of sounds provided. chaos mode, love that for us 🎲
  • -d β€” turn on debugging. this will produce diagnostic output to stdout. πŸ›

🌈 EXAMPLE 🌈

the following could appear in the .forward file in your home directory. (this assumes that your username is pickard β€” hi pickard πŸ’œ)

\pickard, |"/usr/local/bin/mailsound"

here is a sample $HOME/.mailsounds file:

Andrew.*  -r Passing_Train riot arrp flinstones
root.*         out!
daemon.*  -v 220 sci_fi_fun
MAILER.*  -S 1000,10000 cuckoo pig  Oomph
*.        pigs

look at that lineup. the range. the drama. obsessed. 🐷


πŸŽ€ FILES πŸŽ€

  • $HOME/.mailsounds

πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, iykyk πŸ’…


⭐ AUTHOR ⭐

this program was written by Andrew Scherpbier at San Diego State University. he can be reached by E-mail as follows:

Andrew@SDSU.Edu

the mailsound program makes use of Mark Boyns' rplay package which can play multiple sounds on remote machines. he can be reached by E-mail as follows:

boyns@sdsu.edu

shoutout to the devs, real ones fr fr 🫢


πŸ’€ BUGS πŸ’€

not me telling you this but... the code does very little error checking. and no range checking on any of the values is done. so like, be normal about your inputs, bestie. πŸ™ˆ


and that's the whole page!! this version of the manual was dated 11 August 1993 and belongs to the MAILSOUND(1) crew β€” tysm for reading, mwah, slay, periodt πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘