Script to fetch headers only from popserver
#! /bin/sh
# run as scriptname > ~/mailfile
(echo user your_username
echo pass your_password
echo stat
sleep 3
num=`tail -1 ~/mailfile | sed -n 's/\(+OK \)\([0-9][0-9]*\)\( .*\)/\2/p'`
j=1 ; until [ "$j" -gt "$num" ] ; do echo -n "$j" >> ~/numfile
echo -n " " >> ~/numfile
j=`expr "$j" + 1` ; done
sleep 3
for i in `cat ~/numfile`
do
echo top $i 0
done
rm ~/numfile
echo quit)| nc -vvv your_popserver's_name(pop.isp.foo) 110
If anyone is interested, the next part of this script will grep through
the headers and delete mails that fail a positive test or pass a negative
test, on the server, then pull down the remainder. Should be finished with
it tomorrow.
This is for a version of netcat that has been compiled with
-DGAPING_SECURITY_HOLE turned on, which may or may not make a difference with
builds where it isn't. Not sure.
--
Later, Alan C
take control of your mailbox ----- elrav1 -----
http://tinyurl.com/l55a
spammers hate this program because they can't beat it