Say What? What is SpamGen you say!

Well its finally here! Look no further for a way to generate email traffic for your environment. This app is for the smallest environment to the enterprise environment. What is it you ask, SpamGen!

SpamGen is a  pure PowerShell application designed to generate email traffic for lab testing. It does have other possibilities, or application areas it could be used. It is robust and can be ran on any windows OS that has PowerShell 3.0 or 4.0.

First let me start by saying it is intended to be used in a lab environment to generate traffic for various application testing wither that’s Microsoft Exchange,  IBM Lotus Notes, PostFix, or even SendMail. So use caution when running in a production environment!

So the basics. Yes I’m sorry there is some math….. What do I mean, its simply really.

Users x Number = Total Messages Generated.

For example if my lab has 500 users, and I want to send 25,000 Messages that’s 12,500,000 Million messages.

Just like any application there are requirements ,

System Recommendations

  • 2 cores (Recommend 4 Cores)
  • 4 GBs Ram or more (Recommend 8GB)
  • PowerShell 3 or above.

Got it? Good! Lets move on…..

Let me walk you through the process. Its easy and only takes a few mins to get started.

First download it, yes I know seems obvious right.

Once you unzip the file double click the app SpamGen.exe.(Don’t worry, its coded to run as administrator)

The first window is just a notifier, SpamGen is preparing to install. it will disappear after 5 seconds.

Install

The next window allows you to choose where you want the install directory to be. Default is c:\Program Files\SpamGen.

directory

In that directory a few items will be created.

  1.  Logs folder.
  2. EmailBody.txt

file

The next window is where the magic happens. But before you enter anything, lets go back to that EmailBody.txt file I just mentioned.

Open EmailBody.txt with your favorite text editor. You can leave the default message if you like, or delete and create your own. The default message will generate a email 28KB in size. The more text, the bigger the email size. Once your done save the file.

Email

Lets return to the previous windows and start modifying the required fields. First enter the full file path for the .txt file with all the smtp addresses you what to send to. For Microsoft Exchange to get this information use the Get-Mailbox -resultsize unlimited | Select PrimarySmtpAddress >> .\smtp.txt. Note the directory of your PowerShell Session, the file will be located there.

Main

Next lets enter the FDQN of your SMTP server. This can be Hub Transports, Postfix, SendMail, any MTA really. As long as it accepts SMTP traffic on port 25.

Enter the From Address, the default is SpamGen@YourDomain.com

Next enter the subject for this lovely email. Don’t be afraid to get creative.

Now this is were it gets amazing….. If you want to include an attachment you can its purely optional. Say what!! Yes an attachment. Just think of it, the possibilities.

Now remember that math, enter the number of message per user you want to send. So 2000 Users times 5000 Messages = 10 Million Messages. I recommend using lower numbers, and having multiple instances of the application running.

Then click continue.

Once the SpamGen is running you will see the follow message until its completed. You can always check the process by opening the Logs folder and checking out the PowerShell Transcript.

 

Progress

Now that’ s it. That simple. You now can load test a hub, or postfix box. You can hammer a mailbox server or database with emails. You could email your entire org a corp communication, or marketing. You could generate test traffic for a new Monitoring Tool say MailScape by Enow.

Thanks for reading and happy coding!

Download Here SpamGen

About the Author

James Davis

My name is James Davis and i currently live in Colorado. I have been apart of the technology workforce for 10 years. I started out serving for the military in what was then called the Base Band Node. Since those days I have moved on and up in to the corporate world. I am now a Architect/Engineer for a top fortune 250 company.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You may also like these