Active Topics

 


Reply
Thread Tools
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#11
Alright so here is my script! It fetches emails from a Mailinator account.

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

Code:
#! /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:&amp;:\&: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-links
Your mails will build up with messy filenames, but the point is you can read them at your leisure.

Thanks for the help everyone!
__________________
"Impossible is not in the Maemo vocabulary" - Caballero

Last edited by GameboyRMH; 2010-12-03 at 14:15.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#12
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/&amp;/\&/g' -e 's/^.*\(http:.*showmail.jsp.*\)<.*$/\1/p' | \
wget -nc -qi -
 
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#13
Originally Posted by lma View Post
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/&amp;/\&/g' -e 's/^.*\(http:.*showmail.jsp.*\)<.*$/\1/p' | \
wget -nc -qi -
Wow, does that really replicate all the functionality!?

Edit: Well I sat down and looked through it for a while and I finally understand how you did that...mostly
__________________
"Impossible is not in the Maemo vocabulary" - Caballero

Last edited by GameboyRMH; 2010-12-03 at 23:36.
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:40.