This will only work for people with
a) a *n*x with Gnuish tools
b) delivery to Maildirs
Qmail is not really necessary.
This is a polling solution, so you can determine yourself when to put load on
your machine.
Setup: Direct the cpan-testers to a separate Maildir, fix the setup in the included
script,
run it in the background.
Jost
--
| [EMAIL PROTECTED] Please help stamp out spam! |
| Postmaster, JAPH, resident answer machine am RZ der RUB |
| Pluralitas non est ponenda sine necessitate |
| William of Ockham (1285-1347/49) |
#!/bin/bash
# setup
export QMAILUSER=Jost.Krieger+smokeback
export QMAILSUSER=Jost.Krieger+smokeback
export QMAILNAME="Josts Smokehouse"
MAILDIR=/mail/kriegjcb/Maildir-cpansmoke
SLEEPTIME=300
WAITTIME=40
# redirect outputs
exec < /dev/null > /tmp/smokeout.$$ 2>&1
# preset
NOTIFY=true
# main loop
while true
do
# should we stop
if [ -f $MAILDIR/.stop ]
then
rm $MAILDIR/.stop
echo outa here ...
exit 0
fi
# clean out non-uploads
find $MAILDIR/new/ -type f |xargs -r grep -L 'Subject: CPAN Upload'| xargs -r rm
# collect new uploads
NEXT=$(find $MAILDIR/new/ -type f -mmin +60 | xargs grep -l 'Subject: CPAN Upload'|
head -1)
if [ -z "$NEXT" ]
then
$NOTIFY && echo going to sleep ...
NOTIFY=false
sleep 300
else
NOTIFY=true
cpansmoke -avps $(perl -ne 'print "$1" if /^Subject: CPAN Upload: (\S+)/' $NEXT)
mv $NEXT $MAILDIR/cur
fi
done