#!/bin/sh -e # I wrote this when frustrated with how slow fetchmail was over a high-latency # dialup link. The "mailout" script that's on the other host is included as # getmail-mailout. cd ~/new echo "Moving mail" name=`ssh pils.us-lot.org /home/azz/bin/mailout` here=mail.$$.bz2 [ "$name" != "" ] echo "Retrieving mail from $name to $here" scp pils.us-lot.org:$name $here ssh pils.us-lot.org rm -f $name ls -l $here echo "Processing mail" bunzip2 <$here | formail -s procmail echo "Done" rm -f $here