Networking Forums

Networking Forums > Computer Networking > Linux Networking > script to fetch headers only from popserver

Reply
Thread Tools Display Modes

script to fetch headers only from popserver

 
 
Alan Connor
Guest
Posts: n/a

 
      09-22-2003, 07:01 AM
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where does sendmail fetch the <mailText> from? no.top.post@gmail.com Linux Networking 20 09-24-2011 02:13 PM
Cannot fetch mail from remote host ttf Linux Networking 6 06-01-2006 05:21 PM
DHCP - IP address fetch feature in XP SP2 Jan Windows Networking 0 04-07-2006 05:29 PM
802.11 b headers Adrian Wireless Internet 2 11-21-2005 09:56 AM
tiscali dsl flat: ports are blocked, can I tell server to fetch packets for me instead? ludwig Linux Networking 1 11-09-2003 08:57 PM



1 2 3 4 5 6 7 8 9 10 11