|
|
2010-12-03
, 15:39
|
|
Posts: 2,802 |
Thanked: 4,490 times |
Joined on Nov 2007
|
#12
|
#!/bin/sh cd /home/user/mailinator-emails && \ wget -qO - http://www.mailinator.com/rss.jsp?email=YOURMAILBOXNAMEGOESHERE | \ sed -ne 's/&/\&/g' -e 's/^.*\(http:.*showmail.jsp.*\)<.*$/\1/p' | \ wget -nc -qi -
|
|
2010-12-03
, 15:42
|
|
Posts: 692 |
Thanked: 264 times |
Joined on Dec 2009
|
#13
|
Aha, I didn't know about mailinator. Looks useful, thanks!
There's something about unnecessary forks, temp files and long pipelines that bugs me, so here's a shorter version :-)
Code:#!/bin/sh cd /home/user/mailinator-emails && \ wget -qO - http://www.mailinator.com/rss.jsp?email=YOURMAILBOXNAMEGOESHERE | \ sed -ne 's/&/\&/g' -e 's/^.*\(http:.*showmail.jsp.*\)<.*$/\1/p' | \ wget -nc -qi -

Mailinator emails usually disappear after a while, but with this script you can run it hourly or whatever so you can make sure you get your emails.. Plus you can now use obfuscated mailinator addresses so nobody has to know the real name of the account you're checking.
This would be very handy for, say, the contact email on a Tor server
#! /bin/sh wget http://www.mailinator.com/rss.jsp?email=YOURMAILBOXNAMEGOESHERE -O /tmp/mailinator-feed #get rss feed grep link /tmp/mailinator-feed | grep showmail | sed -e 's/<[^>][^>]*>//g' -e '/^ *$/d'| sed -e 's:&:\&:g' > /tmp/mailinator-links #pick out email links and replace ampersand html entity cd /home/user/mailinator-emails/ #mail goes here #download emails for url in $(cut -f 1 /tmp/mailinator-links); do url=`echo -n "${url}" | tr -d '\r'` wget -nc "${url}" done #clean up temp files rm /tmp/mailinator-feed rm /tmp/mailinator-linksThanks for the help everyone!
"Impossible is not in the Maemo vocabulary" - Caballero
Last edited by GameboyRMH; 2010-12-03 at 14:15.