Apr 16 2018

How can I purposely send a message that will be marked as spam in Gmail? Web Applications Stack Exchange

#how #to #test #spam #filter


I’m trying to test out forwarding, filters, and spam. I want to see how a spam message will be affected by my current configuration.

I want to send myself a message that will show up as spam in my Gmail address.
How can I do this?

Notice how this is not asking how to send a spam message that won’t be caught by the gmail filters. it’s asking the exact opposite.

Ideally, the solution shouldn’t cause my email address to go on some global black list on gmail’s servers. If your method does cause this sort of thing, please mention it so that people trying it out will take care to use a test account they don’t actually use.

Please don’t offer a solution which doesn’t answer the question above and instead focuses on a solution for this specific example. The reason being that my criteria could change tomorrow and I might have some other reason to test spam messages.

Things I have tried which didn’t work:

  • Sending an email with no subject and no body
  • Using “viagra” in the subject line
  • Using random symbols in the subject line

Things I don’t want to try:

  • Reporting a message as spam on the receiving account. I’m afraid Google might think it’s actual spam and because I’m using a gmail address to send the message, I might be in violation of the agreement, or they may report my information (e.g. IP address I used to sign up for gmail) to some other authority.

asked Aug 17 ’10 at 5:37

What I ended up doing, which worked really well, was creating an email with some text in the body:

This is a test of the email system. This is not a real spam message, but rather one that is trying to purposely get into the spam folder of another account. This is so that I can ensure that my Gmail filters are setup correctly.

and a subject line such as:

Test Spam Message 1

I always incremented the number at the end of the subject for each message I sent. This way it doesn’t look like a duplicate to Gmail and is actually delivered.

Next, on the receiving account, I decided to go ahead and mark the message as spam. I read in the help that it mentions that marking a message as spam is reversible. They even give an example of how a user might accidentally mark a message as spam, then undo it. This is exactly what I am hoping to emulate.

After marking the first message as spam, all the others (which contain the exact same body and only differ in the subject by one letter) are sent to spam as well.

Once I was done with the testing, I marked all the messages as non-spam. Hopefully Gmail treats this as a user accidentally marking a message as spam and doesn’t resort to blacklisting the address or doing something worse.

Update: After trying this again, I had to mark a message as spam twice before anything started happening, and then I noticed weird behaviors on the account that was sending the “spam”. The account was automatically logged off, and I couldn’t log back in for a while. This might be an automated measure Gmail takes when users report other Gmail users as spammers.

answered Aug 17 ’10 at 13:04

Logically if you repeatedly send emails that gmail interprets as spam then your email account will become a candidate for going on a blacklist. So I would start out with a throwaway test email rather than one you might want to use again.

Secondly the easiest way to simulate spam is to farm the farmers. Why not just put the test email account as a plain link on your homepage – you can then guarantee that spam will be targeting that account within a few hours.

answered Aug 17 ’10 at 9:20

Thanks for the suggestion. I m looking for a way where I can control exactly when a message is sent rather than getting flooded by too many messages, or, on the opposite side of the scale, waiting too long until I get the next spam message. The ideal situation is if I can consistently send myself a spam message. Senseful Aug 17 ’10 at 22:11

This will only help you if you can do a bit of programming:

  • set up an SMTP client (e.g. if you are on Windows, install IIS and SMTP support)
  • write a program in your favorite programming language that will send the email message and have it use your local SMTP server
  • use a random, invalid email for “from”
  • put “viagra” in subject and body for good measure

I would think that would do it.

Written by admin

Leave a Reply

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