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


And add this simple code:

# Fake email just for fun
cat victims.txt | { while read; do
  echo $REPLY >> fakemailog.txt
  mime-construct –header ‘Sender:’ –header ‘From:’ –to $REPLY –subject ‘Invitation to the Royal Ball’ –file fakebody.txt
  sleep 2

4. Make the script executable:

chmod +x

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


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:

8. Run your fake email script:


Off you go and have some fun, I need to dash, I just received an email from the Queen!!


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# ./
    ./ line 4:  : command not found
    ./ line 5:  : command not found
    ./ line 6:  : command not found

  2. Hi Anonymous,

    ./ 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: Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s