mail: Send mail with the correct envelope sender.
[newsgate] / defs
1 ## -*-sh-*-
2 ##
3 ## Shell definitions for newsgate
4
5 NEWS=/usr/lib/news
6 QMAIL=/var/qmail
7 PATH=$NEWS/bin:$QMAIL/bin:$HOME/bin:$PATH
8 export PATH
9
10 bad () { echo >&2 "newsgate: fatal: $*"; exit 100; }
11 fail () { echo >&2 "newsgate: $*"; exit 111; }
12
13 control () {
14 if [ -r $QMAIL/control/$1 ]; then
15 cat $QMAIL/control/$1
16 elif [ "${2+yes}" ]; then
17 echo "$2"
18 else
19 bad "control $1 not found"
20 fi
21 }
22
23 me=$(control me)