| 1 |
.TH MAILSOUND 1 "11 August 1993" |
| 2 |
.SH NAME |
| 3 |
mailsound \- play sounds when mail is received |
| 4 |
.SH SYNOPSIS |
| 5 |
.B mailsound |
| •6 |
[\-hszZvrd] soundname \.\.\. |
| 7 |
.SH DESCRIPTION |
| 8 |
mailsound allows a user to play sounds when new mail arrives. |
| 9 |
It reads a mail message from stdin and uses Mark Boyns' |
| 10 |
.B rplay |
| 11 |
library to play sounds. |
| 12 |
The sound that is played is determined by a configuration file in the user's home directory |
| 13 |
called |
| 14 |
.B .mailsounds. |
| 15 |
Each line in this file has two parts. The first part is a regular expression which will be used to match |
| 16 |
the from address from a mail message. The second part describes what to do when a match is found. |
| 17 |
The options in the second part are identical to the options on the command line. |
| 18 |
The command line options will set defaults which will be used if they are not specified in the |
| 19 |
configuration file. |
| 20 |
.br |
| 21 |
If not specified, the |
| 22 |
.B mailsound |
| 23 |
program will use the following defaults: |
| 24 |
.IP |
| 25 |
default sound: youvegotmail.au |
| 26 |
.br |
| 27 |
default volume: 127 (50%) |
| 28 |
|
| 29 |
.RE |
| 30 |
If the mail address does not match any of the regular expressions in the |
| 31 |
.B .mailsounds |
| 32 |
file, no sound will be played. |
| 33 |
.SH OPTIONS |
| 34 |
.TP |
| 35 |
.B \-h hostname:[hostname\.\.\.] |
| 36 |
Play sounds on all of these hosts. |
| 37 |
.TP |
| 38 |
.B \-z <minsize>:<minvolume>,<maxsize>:<maxvolume> |
| 39 |
The volume the sound will be played at will be determined by the size of the mail message. |
| 40 |
The sound for a message with a size smaller than |
| 41 |
.B <minsize> |
| 42 |
will be played at volume |
| 43 |
.B <minvolume>. |
| 44 |
The sound for a message with a size larger than |
| 45 |
.B <maxsize> |
| 46 |
will be played at volume |
| 47 |
.B <maxvolume>. |
| 48 |
The sound for a message with a size between |
| 49 |
.B <minsize> |
| 50 |
and |
| 51 |
.B <maxsize> |
| 52 |
will be played at a volume |
| 53 |
which is a linear interpolation between |
| 54 |
.B <minvolume> |
| 55 |
and |
| 56 |
.B <maxvolume>. |
| 57 |
.TP |
| 58 |
.B \-Z <minsize>,<maxsize> |
| 59 |
The sound to be played is determined by the size of the mail message. |
| 60 |
If the message is smaller than |
| 61 |
.B <minsize>, |
| 62 |
the first listed sound is played. |
| 63 |
If the message is larger than |
| 64 |
.B <maxsize>, |
| 65 |
the last listed sound is played. |
| 66 |
If the message size is between those two values, the appropriate sound from the list is played. |
| 67 |
.TP |
| 68 |
.B \-s <subject re> |
| 69 |
The regular expression supplied will have to match the subject of the message. |
| 70 |
If this option is not there, the subject of the message is completely ignored. |
| 71 |
Be careful that the regular expression does not contain spaces. Due to laziness of the |
| 72 |
author of this program, this will hopelessly confuse the program. |
| 73 |
.TP |
| 74 |
.B \-v <int> |
| 75 |
Set the volume at which the sound should be played. The range is 0-255. |
| 76 |
.TP |
| 77 |
.B \-r |
| 78 |
Pick a sound at random from the list of sounds provided. |
| 79 |
.TP |
| 80 |
.B \-d |
| 81 |
Turn on debugging. This will produce diagnostic output to stdout. |
| 82 |
.SH EXAMPLE |
| 83 |
.LP |
| 84 |
The following could appear in the .forward file in your home directory: |
| 85 |
(This assumes that your username is pickard) |
| 86 |
.IP |
| 87 |
\\pickard, |"/usr/local/bin/mailsound" |
| 88 |
.LP |
| 89 |
Here is a sample $HOME/.mailsounds file: |
| 90 |
.IP |
| 91 |
.nf |
| •92 |
Andrew.* \-r Passing_Train riot arrp flinstones |
| 93 |
root.* out! |
| •94 |
daemon.* \-v 220 sci_fi_fun |
| 95 |
MAILER.* \-S 1000,10000 cuckoo pig Oomph |
| 96 |
*. pigs |
| 97 |
.fi |
| 98 |
.SH FILES |
| 99 |
$HOME/.mailsounds |
| 100 |
.SH "SEE ALSO" |
| 101 |
.BR rplay.conf (5), |
| 102 |
.BR rplayd (1) |
| 103 |
.SH AUTHOR |
| 104 |
This program was written by Andrew Scherpbier at San Diego State University. |
| 105 |
He can be reached by E-mail as follows: |
| 106 |
.RS |
| 107 |
|
| 108 |
.B [email protected] |
| 109 |
|
| 110 |
.RE |
| 111 |
The |
| 112 |
.B mailsound |
| 113 |
program makes use of Mark Boyns' |
| 114 |
.B rplay |
| 115 |
package which can play multiple sounds on remote machines. |
| 116 |
.br |
| 117 |
He can be reached by E-mail as follows: |
| 118 |
.RS |
| 119 |
|
| 120 |
.B [email protected] |
| 121 |
.RE |
| 122 |
.SH BUGS |
| 123 |
The code does very little error checking. No range checking on any of the values is done. |