Send email from a fake address

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!!

Advertisements

3 thoughts on “Send email from a fake address

  1. cant run the sript. The report is above this message. See you, nice tutorial

    root@debian:~# cd /bin
    root@debian:/bin# ./fakemail.sh
    ./fakemail.sh: line 4:  : command not found
    ./fakemail.sh: line 5:  : command not found
    ./fakemail.sh: line 6:  : command not found
    root@debian:/bin#

  2. Hi Anonymous,

    ./fakemail.sh: line 4: : command not found

    Line 4 is “echo”, so if that command isn't found then you have problems. Did you follow all the instructions, not just run the script as it is?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s