How to send fake emails from fake/invented email addresses
Want to play a trick on your friends?
How about sending an email to your Linux-using Geek buddies from Linus Torvalds, or the Queen of England? Maybe your sister loves Justin Bieber?
Ok, you just need Postfix installed on your Linux box and a simple bash script, and the most excellent mime-construct. I use Vim text editor for my guide, but just replace it with the editor of your choice.
1. Install mime-construct from the repos:
sudo apt-get install mime-construct
2. Put this bash script in your /bin directory:
cd bin
vim fakemail.sh
And add this simple code:
#!/bin/bash
# Fake email just for fun
cat victims.txt | { while read; do
echo $REPLY >> fakemailog.txt
mime-construct –header ‘Sender: queen_elizabeth@buckinghampalace.com’ –header ‘From: queen_elizabeth@buckinghampalace.com’ –to $REPLY –subject ‘Invitation to the Royal Ball’ –file fakebody.txt
sleep 2
done
}
4. Make the script executable:
chmod +x fakemail.sh
5. Write your funny fake email message in a file called “fakebody.txt”
vim fakebody.txt
———-
The Queen is holding a special royal ball for the gullible people in your town.
You are invited to assist on the 1st of April, 2012
RSVP
———-
6. There is a log file in case you mail to multiple addresses
(to run a “tail -f fakemail.txt” to see how far the script has got with your list of victims):
vim fakemailog.txt
7. Now create the list of email addresses you want as victims 🙂
vim victims.txt
And add:
———–
myvictim@aprilfool.com
myvictim2@biggerfool.com
etc
———-
8. Run your fake email script:
./fakemail.sh
Off you go and have some fun, I need to dash, I just received an email from the Queen!!