tags:

views:

82

answers:

3

Hello everyone,

I've written a bug reporter for my game, and after it launches, the user can review the data and submit the report to my web server via HTTP. If the submission fails, the user has the option to save the report and try again later, using the bug reporter itself, uploading the file with a web form, or attaching the report to an e-mail. I know that I can prevent spam over HTTP by analyzing the source IP, but I'm not sure how to go about this when receiving reports over e-mail. Any ideas?

Thanks, Rob

EDIT:

The attachment will always be in JSON format; any other will be rejected. I'm just worried someone will do this:

for i = 1, 10000 do
  json = generate_valid_json()
  send_email(json)
end

and flood my bug tracker with noise.

A: 

Sounds like you're trying to tell the difference between e-mail from random people you've never talked to before, that are sending you attachments, from spam e-mail.

Good luck!

  • Can you change the e-mail address every so often?
  • Require a certain subject line?
  • Require plain-text e-mail?
Tom Ritter
+2  A: 

Other than regular spam filters, etc I do have a suggestion for this.

If, in your application, or page, you can specify a Subject= with the Mailto: link, put a unique ID in the Subject of your message that you will be expecting to receive.

That way you accomplish 2 goals - recognizing the ID in the subject, you will know it's not spam, and if that ID is associated with your bug report, you'll already know where to put it when it arrives.

EDIT: This doesn't necessarily have to be in the subject, either - could be in the body, or you could simply give them a unique ID e-mail address to send to if you can support a catchall... like [email protected].

routeNpingme
I like the ID idea. I could somehow generate an ID client-side (kind of like a CD key) and make sure each ID validates and is used only once. However, since my game and all of its code is open source, someone could probably spoof these IDs if they really wanted to.
You could just make the ID generation service into a web service. That way you control the generation of the IDs outside of the game code.
routeNpingme
Yes, but keep in mind that reports are only saved if submission to my web server fails. =)
@Rob - then host the web service on the e-mail server ;) No really, if your infrastructure is down, the email might not work anyway, so I liked the idea from Aaron below in that situation...
routeNpingme
+1  A: 

How about saving the report when the first attempt to upload fails. When the user starts the game, start a background thread which tries to deliver the report again. Eventually, it should work and the user will have to do anything.

Aaron Digulla
I love that idea! I still like retaining the option to have the user send it themselves, but I'll definitely implement this in the future!