80a3207e301d55dd494faed8bc3cff5c453b85c7
[capablanca.git] / spool_sendmail
1 #!/bin/sh
2 # simple mail spool handler for chessd
3 # Andrew Tridgell <tridge@chess.samba.org>
4
5 shopt -s nullglob
6
7 cd $HOME/chessd || exit 1
8
9 (
10 while :; do
11    for f in spool/mail.*; do
12             if /usr/lib/sendmail -t < $f; then
13                /bin/rm -f $f
14             fi  
15    done
16    sleep 60
17 done
18 ) >> spool.log 2>&1